- platform: zone
entity_id: device_tracker.life360_1,device_tracker.life360_2
zone: zone.one
- platform: zone
entity_id: device_tracker.life360_1,device_tracker.life360_2
zone: zone.two
if you don’t care about entering or leaving you can omit that. It doesn’t really spell out that it’s required. If it is, then you’ll have to keep all the separate triggers.
For some reason the leave isn’t working in this, I only get enter messages. I changed the action in the message if trigger.event to enter (from leave) and it triggered properly (gave me the left message). It just doesn’t seem to send a leave trigger.event.
condition:
- condition: template
value_template: >-
{{ trigger.event in ['enter','leave'] }}
action:
data_template:
message: >-
{% if trigger.event == 'leave' %}
{{ trigger.to_state.attributes.friendly_name }} left {{ trigger.zone.attributes.friendly_name }} at {{now().strftime("%c")}}
{% else %}
{{ trigger.to_state.attributes.friendly_name }} arrived at {{ trigger.zone.attributes.friendly_name }} at {{now().strftime("%c")}}
{% endif %}