Help with Virtual Switch Rule

I've been pretty much set with my automations and have not played with RM in a while, so I am having a complete brain fart on how to accomplish what I think should be a pretty easy automation....

I have a simple automation that says when garage entry door (side door not big garage door) opens via contact sensor, lights come on. When door shuts, lights go off in 1 minute. Simple as it gets.

We just put a beer fridge in the garage and since it gets really hot in the garage, we are leaving the side door open for ventilation. This, the lights are staying on.

I want to create a rule that either:
(a) enables a virtual switch [on] to disable that simple rule after XX minutes of the contact/door being open and will disable the switch [off] when the contact/door is closed again
OR
(b) create a boolean that says something like "if contact open for more than XX minutes, then enable [on] virtual switch" and "if contact closed, re-enable original simple rule"

I can't for the life of me figure out the XX minutes part so that the lights go off when the door is opened for XX minutes. Suggestions?

You over think things like I do.
:grin:
Do you have other triggers? Such as motion? or another door? I've already got this rule in my arsenal of rule manager rules for the most part, so you'd just have to modify it for you use case and exclude the door being closed as a trigger to turn off the lights.

It's not perfect, but it works for us. Hope that helps? If not, shout and I'll toss in some more ideas.

Thank you. I had not used the IF/THEN before. I tried this. Do you think it will work?

I'm a hands on kind of girl. I'd try it. My only concern is that if you're in the garage and the lights turn off. Unless there's something else you have going on, you don't really need the variable, you could simplify it to delaying it and canceling delayed actions and save the work of trying to figure it out later when you maek changes
trigger:
g-door open
if gdoor closed
then cancel delayed actions
else if
g-door open
and lights are on
then
off lights
delay 15 minutes cancelable.

But try yours. If it works, you win! If not we'll tackle it

Yeah, yours is probably better. I'm trying mine now, but I think I'll try yours too. Thank you!

lower your countdown time to 1 or two minutes for testing.

@todd.barrineau - And mine is NOT better. But it's how i know how to do it. Probably nothing wrong with yours either. There's more than one way to tackle this. There's no right answer.
:grin:

I'd like to know how you turned out with this. Always something that can be learned from it.

Unless I’m missing something…

I used on/off but dim works just as well.

How do you define "Delayed Actions"?

Doesn't look like it worked. I have to leave the house now so I'll come back to it tomorrow and keep tinkering.

1 Like

You setup the delay when you create or edit the action.

I did miss one step in my example. I forgot to make it cancelable.

Just select delay then set the time and make it cancelable.

I think this might have it. Testing now. Thanks, all!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.