I want to trigger a cover action when a person entity has been away from my home zone for at least 5 minutes.
Here is how it’s supposed to work: Leave the Home zone for more than 5 mins. Upon entering the Gate zone, send a notification to my phone, wait 2 minutes, open a cover.
Using the Web UI results in the YAML below. I thought this would work, but I can see in the history that “me” (the person entity) enters the zone called Gate after I’ve been away for much longer than 5 minutes, and none of the actions are triggered. I guess I have 1 or 2 simple questions. 1: Is the time parameter in the condition discrete or is it anything equal/greater? If its discrete, any tips on making it equal or greater?
trigger:
- platform: zone
entity_id: person.me
zone: zone.gate
event: enter
condition:
- condition: state
entity_id: person.me
state: away
for:
hours: 0
minutes: 5
seconds: 0
action:
- device_id: it's a device ID (I've removed it)
domain: mobile_app
type: notify
message: Gate is Opening
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: cover.open_cover
target:
entity_id: cover.gate
Thanks all.