I’d like to create automation that checks the state of a binary sensor (reed switch on my garage door) after a certain time. I feel this should be easy and I’m just missing something, but what I did before only seems to check if the state has changed after the time, not if it was already in the state. So basically after say 10pm, I want to check if the state of the sensor is off and then do some action, even if the state changed prior to that (like I left the garage door open at 6pm and forgot about it).
Trigger time at 10p
Condition garage open. <use entity state not device
Do stuff
I forgot the caveat - I don’t really care if the garage door is just “open” really only if it’s been open longer than say, 5 minutes and it’s after 10 pm.
Also, and I think maybe this is where I was getting hung up - Is it possible to continuously check? Like rather than a single time trigger? More of checking during a range? Maybe I’m thinking about this wrong.
Triggers:
- time: 10pm
- entity state: garage door “open” for 5 minutes
Conditions:
- time: after 10pm, before 6:00am(??)
- entity state: garage door “open” for 5 minutes
Actions:
- stuff
In general, if you want something to happen when multiple conditions are met, then you need to add them all as triggers and also all as conditions.
Thank you, I think that’s exactly what I was missing - I haven’t gotten creative enough on some of this and that was one thing I hadn’t thought of yet was using a time as a trigger and condition both.