Hello everyone! I’ve got my master bathroom door set up with a sensor to trigger the bathroom dimmer switch when opened. I have it set to turn off the dimmer after the door is closed and subsequently opened again. These are working perfectly, but I’m having trouble wrapping my head around adding another condition to turn the light off if the door happens to be left open for a couple of minutes and them closed.
I have:
BLightOn
BDoorClosed
BDoorOpen
AutoOn: !BLightOn; BDoorOpen
AutoOff: BLightOn; BDoorOpen; BDoorClosed
This works perfect, but there are times when the site isn’t closed behind the person when entering. Thus, they leave and the light will stay on. I want to say if AutoOn happens and the door does not close for a few minutes, then turn the light off when it does close.
I tried:
LeftOpen: AutoOn and (BDoorOpen; BDoorClose) and (BDoorOpen; NOW > 3:00)
That would shut the light off at 3:00 no matter what. Do I need to create a condition that results in true when the BDoor is open for > 3:00 and then use that condition in my LeftOpen condition?
Create a timer …
BLightTimer Self Retrigger, Off Interval 3:00 minutes
Add an Action to BDoorOpen
Using Advanced Tab, Add PLEG device, action is StartTimer, TimerName is BLightTimer
Add Condition:
LeftOpen BLightOn and BDoorOpen and (BLightOn; !PLightTimer)
[hr]
Note you can remove BDoorClosed and replace it with !BDoorOpen
Thank you! I knew I was missing something along the way.
EDIT: Actually, I wrote my original post on my phone and looked at your reply on there as well. When I got home I realized my original post was a little confusing and your solution would not work. Your solution turns the light off if someone goes in the bathroom and leaves the door open. What I’m actually trying to achieve is a little different. My master bathroom door is always closed. Entering the bathroom turns on the dimmer switch and the vast majority of the time the door is closed behind you after entering (I have a mischievous cat). There are occasions where the door is not closed behind you, thus when you do close it on your way out, the light stays on.
So normally this happens:
DoorClosed; DoorOpen; LightOn — DoorClosed and bathroom occupied. DoorOpen; DoorClosed; LightOff
That works great…except the times when someone goes in there for a few minutes and doesn’t shut the door behind them after entering, but shuts the door on leaving. So I need to be able to:
DoorClosed; DoorOpen; LightOn — DoorOpen and bathroom occupied. DoorOpen > 3:00; DoorClosed; LightOff
Sorry to be so confusing
Ok, I got what I was looking for by going the route attached below.
It says 1:00 on the timer condition just because that made it easier to test rather than waiting 3. It’s now on 3 and working perfectly. If someone enters the bathroom and shuts the door behind them, the light will turn off when they leave the bathroom, closing the door behind them again. If they enter the bathroom, but don’t shut the door behind them, the light will turn off if the door is left open for more than 3 minutes and then closed.