I have a couple of rules set up to turn on lights (controlled by two different plug-in switches) in an out-building. Here is the summary:
-
If either of two doors in the main building are opened, turn on both switches in the outbuilding if it is between sunset and sunrise
-
If either of two motion sensors in the outbuilding sense motion, turn on both switches (regardless of time of day). One motion sensor is in the same room as one of the switches, the other is in another room with the second switch.
I set up a third rule to turn the switches off after a delay with the trigger event being that either of the switches in the outbuilding turn on. Hence, either of the aforementioned rules could trigger the switches to be turned on. The motion sensors are from different manufacturers and both set up as Generic Z-Wave Motion Sensors on the hub.
The trigger for the third rule is as follows:
Shed Lights, Office Lamp(off, off) any turns on
I have a conditional action as follows:
IF (Office Motion Sensor, Shed Motion Sensor all motion inactive TRUE) Off: Shed Lights, Office Lamp (Command only switches that are on)
--> delayed: 0:10:00
Here is the conundrum: If the switches are triggered by opening either of the doors in the main building, the rule executes properly, with the outbuilding lights turning off after 10 minutes. If the switches are triggered by motion being sensed, then they stay on forever unless I turn them off manually. This occurs even if the device status of the motion sensors is inactive in the app or dashboard. In other words, I could have left the outbuilding yesterday, the motion sensors show inactive, but the lights stay on.
I've tried a lot of different settings in the rules, and for the life of me cannot get this to work as intended whenever the switches are triggered from motion versus contact (ie door) sensors.
For additional information, here are some use-case scenarios:
If it is dark and I leave the main building, I want the lights to be on in the outbuilding so they are already turned on when I get there.
If it is any time of day or night and I enter the outbuilding (without opening the main building doors with the sensors) I want the lights to go on as well because there is not much ambient light in either of the outbuilding rooms.
Hope this makes sense.
Any ideas? It is probably something simple, but at this point I figured I'd ask for some advice.