Periodically check a switch

I have a rule that turns on a light if my virtual switch is turned on during a certain time interval. That works just fine.

However, I want to set it up so that if the switch was initially turned on before that interval and is still on when it enters that interval that the lights still turn on.

So if my interval is 5PM to 11PM, but my switch turns on at 4:45, I want it to recognize at 5 that the switch is on and turn the lights on. How can i have it periodically check the switch during that interval to see if the switch is on?

Simply add another "Certain Time" trigger at 5pm to your existing rule. This way the rule will be evaluated at 5pm and whenever the switch changes states.

1 Like

Oh. I mean, of course that's it :joy:

Too easy, thank you for the quick response!

2 Likes

Hi....you know what i'm probably doing it wrong. It ended up turning the light at the time i put even though the switch was off. Any thoughts on what i'm doing wrong?

I have a trigger event for 5PM
Then in my actions i have two conditionals: if time is between 5PM and 11:59PM and if my virtual switch is on.

When i added that trigger event, the light turned on at 5PM even though the switch was off.

Please post a screen capture of your rule.

My triggers, actions and conditions

You need to use the condition in the actions section as a conditional action, which will appear as an IF THEN ENDIF type of action

Here is your requested rule. Hope this makes sense.

2 Likes

Makes perfect sense, thanks again for patiently walking me through this!

1 Like