Im attempting to make an automation that’s notifies the alert group when users enter or leave a certain zone. Im having issues with multiple trigger alerts though due to gps jumping around. How would I go about adding code to my current yaml below to put like a 30 second delay on the trigger.
alias: Alert - Arrival & departure ECC
description: ''
trigger:
- platform: zone
entity_id:
- person.name1
- person.name2
zone: zone.ECC
event: enter
- platform: zone
entity_id:
- person.name1
- person.name2
zone: zone.ECC
event: leave
condition: []
action:
- service: notify.all_devices
data:
message: |
{% if trigger.event == "leave" %}
{{ trigger.from_state.attributes.friendly_name }} has left {{ trigger.zone.attributes.friendly_name }}
{% else %}
{{ trigger.from_state.attributes.friendly_name }} Arrived at the {{ trigger.zone.attributes.friendly_name }}
{% endif %}
mode: single