Rule to Turn on/off light randomly

Hello All,
I'm having trouble trying to create a rule where it turns on a light randomly after sunset and turn off between 11pm - 1am. I want to simulate occupancy during an upcoming vacation.

Any help is appreciated :grin:

You want How to randomize a turn on time after trigger within defined window - #2 by bravenel if using Rule Machine. Basically, use sunset as the trigger. First action should be to turn on the lights; however, put a random delay on the action.

Then you could wait until a certain time and then use a random delay to turn off the lights.

5 Likes

Thank you so much. Was able to make my rule and it works like a charm.

Cheers :slightly_smiling_face:

2 Likes

Bringing this topic back as I had a weird issue happening.

So while I was out of town with this rule, I noticed that when my phone with the app changed to the local time of where I was it triggered the rule according to that time and not the time in my home. I had to adjust my phone time to reflect what my home time was in order for the rule to "work" properly.

I found that odd as I thought rules where going off of the time in the hub.

1 Like

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