I tried the solution but it doesn’t seem to work. No tracker created.
Also, when trying to use the service manually I encounter a host of issues, basically the format for gps doesn’t seem to be valid for device_tracker.see call.
Any input?
This is what I am trying to do:
Sensors for coordinates extracted from MQTT by my Leaf OVMS:
- platform: mqtt
name: leaf position lat
state_topic: "ovms/nissanleaf/xxx/metric/v/p/latitude"
qos: 1
- platform: mqtt
name: leaf position lon
state_topic: "ovms/nissanleaf/xxx/metric/v/p/longitude"
qos: 1
Automation to update the position/create the tracker:
- id: '1603005245535'
alias: 'Update Leaf position'
description: ''
trigger:
- platform: state
entity_id: sensor.leaf_position_lat
- platform: state
entity_id: sensor.leaf_position_lon
condition: []
action:
- service: device_tracker.see
data:
data_template:
dev_id: Leaf
gps:
- "{{ states('sensor.leaf_position_lat') }}"
- "{{ states('sensor.leaf_position_lon') }}"
mode: single
This is actually triggered (I’ve checked) but no tracker is ever created.
I tried triggering the method manually using the developer tools but it complains about the data_template not being a valid keyword or that I am missing dev_id (depending on how I build up the yaml).