#Automation uses unknown action

1 messages · Page 1 of 1 (latest)

wide ice
#

Hi Team,
I want to post Car coordinates to Traccar using Automation.
Therefore I was impressed by https://github.com/lorenzo-deluca/homeassistant-traccar.git but changed it a little bit for my conditions.
In configuration.yaml I have following to make the automation public..
homeassistant: packages: pack_1: !include traccar_positioning.yaml
And create a rest_command...
rest_command: traccar_positioning: url: "http://192.168.1.12:5055" method: GET payload: "?id={{id}}&lat={{lat}}&lon={{lon}}&altitude={{alt}}"

In traccar_positioning.yaml I put this to call and feed the rest_command with values. (static values until it generally works.)

`automation:

  • id: 'position_tracking_update_traccar_position'
    alias: Position - Update Traccar Position
    description: ''
    triggers:
    • trigger: state
      entity_id:
      • device_tracker.mg_marvel_r_electric_gps_location

    conditions:

    - condition: template

    value_template: '{{ trigger.to_state.state not in [''unknown'', ''unavailable''] }}'

    actions:
    • action: rest_command.traccar_positioning
      continue_on_error: true
      data:
      id: '{{ trigger.entity_id }}'
      lat: '50'
      lon: '10'
      alt: '999'
      mode: parallel
      max: 10`

Whenever a new value is received from the device_tracer entity, the automation is triggered but an error message appears.

|| The automation "Position - Update Traccar Position" (automation.position_update_traccar_position) has an unknown action: rest_command.traccar_positioning.||

It appears to me that the rest_command statement is not recognized by the system. What is my mistake? Any thoughts welcomed.....

GitHub

Send Device Tracker positions from Home Assistant to Traccar Server - lorenzo-deluca/homeassistant-traccar

jovial flume
#

Did you check in the Actions menu to see if that action exists?

hardy mauveBOT
wide ice
#

No, I dont find this action there. I wonder whether this rest_command action has to set in configuration.yaml or the package file. Tried both, but same result

jovial flume
#

Did you restart HA after adding it?

wide ice
#

No, just reloaded the yaml and a quick restart. Will run a complete restart just for sure

jovial flume
#

Reloading YAML only reloads some YAML

#

Also make sure you run a config check

hardy mauveBOT
jovial flume
#

That command spots things the pretty button misses

wide ice
#

tadaaa... that did the trick! Action "rest_command" became available.
Now, with some further minor changes, even the data flows into traccar. 👍