So a lot of people seem to have either settled with the basic timer/delay that is causing me some grief. I find that if the light turns off or in another situation like a door is locked that the delay or timer does not have the ability to account for that in its logic so say the light is turned back on and it has a 15 minute timer, and say you turned it on 5 minutes into its count down, in 10 minutes the lights turn on even though the lights were turned back on. I know one way you can counter that is to add another and its not on but in the situation of a lock, you cant add logic to say delay if the lock was locked then unlocked during that flow. Then you end up with the door locking early or in the case of my kids locking and unlocking multiple times in 15 minutes it can have a bunch of flows queued up triggering the lock to then lock almost instantly once it is unlocked another time close to the 15 minute count down. In the case of the lights I am using room occupancy and I find a very similar experience with the lock where once the room is unoccupied then it is reentered that I find it can then create multiple triggers.
What would be nice is if you could add in the and a timeframe of when it is detected to prevent it from proceeding. For example, with the locks being able to do a flow like Door unlocked - delay 15 minutes - and door is unlocked (X number of minutes) - then lock door. This could work for lights as well. Motion alert is off - delay 15 minutes - and the motion alert is off (X number of minutes) - then turn off lights. I think adding a way to say the and has been in that state for X number of minutes would provide the logic needed to prevent actions that shouldnât proceed from taking place.
I would love to see if anyone has found a way to achieve this through loops or other means. I have attempted through loops but I keep struggling with a good logic flow that doesnât end up with it working as intended.