Simple lighting app

I have this really simple lighting rule where a door contact sensor to a closet turns a light on or off. All running fine and dandy, but the other day my GF was running back and forth ending up forgetting to close the door, and the light stayed on resulting in a never ending low-WAF tirade about "home automation this-and-that".

So I thought I'd fix it by simply add a timeout after given amount of time. The way I interpret the option "After this number of minutes" is: "after you close the door, delay turning off the light by X minutes", is that correct?

If so, this is perfect for a hallway light controlled by an entrance door, but not suitable for my scenario: "if the door is left open, wait X minutes, then turn the light of regardless if the contact sensor is open".

Am I using the wrong app/approach?

I suggest you use a rule in Rule Machine instead:

Conditions: Closet Door Sensor open
Rule: Closet Door Sensor open
Actions for true: Set Closet Lights to 99, turn Closet Lights off after X minutes
Actions for false: turn off Closet Lights

This will turn them on when the door is open, and turn them off when the door is closed. It will also turn them off if the door is left open after X minutes.

3 Likes

RM: something about the logic that seems a tad backwards to me - perfect time to get my feet wet. Your explanations kind of makes sense :wink:

thinking out loud the static rule "Closet door sensor open" always kicks off timer when, in fact, the door sensor is open. If false (closed) turn the light off. Ya, makes sense. Thanks! :slight_smile:

I like it. Never thought of doing this. I had a Simple Lighting and an RM rule to achieve the same.
I just keep on learning. :smile:

@mario.fuchs, @bobbles - I just took a stab at this.
Does this rule look right to you all?

My goal is to follow @bravenel's suggestion and have my closet light turn on when the door open, and off when closed. if left open, I want the light to turn off after 6 mins.

Curious if you had success with this or not.

Thank you!

Looks right to me.

1 Like

Here's another even easier way to do that:

Trigger Event:
   Temp Sensor - Closet open
Actions:
   Dim: Closet Entry Light: 99
   Wait for Event: Temp Sensor - Closet closed, timeout 6:00
   Off: Closet Entry Light
5 Likes

Awesome, thank you Bruce!