Front door opening sensor (binary) - fires when door is opened
Motion sensor on the inside of the front door (binary) - fires when there is movement in the area inside of the door
Presence detection via Wifi AP - operates with some delay until the phone connects to the AP
Now I want to set up an automation that sends an alarm message if, within the time window of 60 seconds, all of these 3 conditions become true at least once:
Door sensor changes from closed to open
Motion sensor changes from clear to detected
Predefined person is not detected as present within this time window (not even once)
I can of course set up each of these 3 as a trigger or condition, but unable to figure out how to combine them as I wrote above i.e. look for the changes within a time window to allow for the presence detector to update (if the case).
That’s probably the simplest, but least ideal, approach.
I’d probably have it with a wait_template with a timeout of 60 seconds of the person being home, and only continuing if the timeout is reached. That’s more involved but will behave better for this.
The condition 2/2/1 (Door has been closed for one minute) - this means that when evaluating this criteria, it will wait for 60 seconds here, no?
I see what you mean with the wait_templates, but I don’t seem to find how to negate i.e. wait for 60 secs looking at the presence, if it turns on, stop waiting and do one thing, if 60 secs elapse without it turning on, execute an action