I just wanted to run an idea by anyone to see if they may have a better flow, or if I'm on the right path.
My goal is to use either of 2 doors to trigger a light, wait for either of those doors to open a second time, then when both are closed turn off the light.
The real life situation is I'm going to my garage. It is attached to my house, so I have the garage door for vehicles to get in, and then a garage/house door to enter my house.
If I go into the garage from either door, I want to turn on the garage light. I typically close either door before I open the other, but then when I close the door from there, I should be out of the garage.
If I did a trigger on either door opening, then in my actions:
- turn on the light
- wait for event of either door opening
- wait for condition of both doors closed
- turn off the light
would this work?
I feel like if I wait for the second instance of a door opening to trigger, it will start a new instance of the rule. I could add a catch in the beginning of the rule, but I would like to try and keep things cleaner if possible.
I haven't necessarily got a solution for you, only some advice. I have wanted to setup rules similar to what you are describing but always decided against it because I was worried I could not cater for different scenarios and it would lead to frustration. The kind of situations I was worried about was either I would change my own personal habits or at times when I have visitors and the combination of multiple people would mean different sequences of motion or other sensor triggers, if that makes sense.
If you can get it working, and I'm sure you can, then that's great. Probably better to just have a go and see what happens, rather than avoiding it like me....
In terms of a solution, one suggestion I would make is to perhaps introduce a motion sensor in addition to the contact sensors. That way you can better manage your understanding of the "state" of the garage, i.e. whether anyone is still in the garage. The kind of situation I would be thinking of is you go into the garage looking to leave, open the garage door for the car then change your mind and close it again.
This works for my particular use case every time even when other people trigger rules without leaving me stranded in the garage trying to feel my way to the door.
I frequently go in the garage to grab tools, cables, ladders, etc for tinkering with crap around the house. Rarely standing/sitting still for any extended length of time unless I'm in the attic. In which case I have an override.
I know this is an old thread, but finally got around to working on this.
Giving this a shot. The way it works in my head:
If either door is opened, cancel everything and turn on the lights. Then set a timer to shut down 3 minutes later.
If both doors are closed, cancel everything and shut off the lights 3 minutes later (not immediate since once I close the garage door, but am still in the car, I still want light).
We'll see if this has the WAF