I have a MQTT stream with positions for different devices.
Is there any way to set a devices to away or ‘none’ with a MQTT publish in some time with inactivity?
It’s possible to set it with some position away from house but is there some way to reset it?
- alias: Position to none
initial_state: 'on'
trigger:
- platform: template
value_template: {{ (as_timestamp (now())-as_timestamp (states.device_tracker.test_mqtt.last_updated | int )) > 600 }}
action:
- service: mqtt.publish
data_template:
topic: "location/test"
payload: '{latitude":"0", "longitude":"0"}'
This is the center of world and not what I want.