Setting up SIMPLE automation

I am hoping that someone can help out an old fart who has just migrated over from Wink and whose addled brain can't figure out the programming part of Hubitat.

I managed to get 5 light switches recognized on my new Hubitat and even managed to figure out how to turn the lights on and off from my computer or my iPhone but I just don't understand the next step which is how to automate the lights. I will break it down into simple steps.

  1. Turn on 3 light switches at sunset. (Switch #1, #2 and #3)
  2. Turn off switch #1 at 23:30
  3. Turn on switch #1 at 23:31
  4. Turn off switch #1 at 23:55
  5. Turn on switch #4 at 23:50
  6. Turn off switch #2 and #3 at midnight
  7. Turn switch #5 on sometime between sunset and midnight - hopefully at a random time
  8. Turn switch #5 off between 5 and 15 minutes after being switched on - hopefully a random duration.

Since switch #4 is in the master bedroom is there then some way to disable the programing if we go to bed early (rarely happens but don't want to be disturbed by a light turning on once in bed).

If someone can provide some guidance on how to achieve steps 1 and 2 I can probably figure out things until I get to steps 7 and 8 - if randomization is even possible.

Thanks in advance for any guidance you can offer.


You can accomplish 1-6 easily using Hubitat’s built-in “Simple Automations” App. Just create one automation for each of your tasks.

I am fairly certain Rule Machine can implement a random delay.

1 Like

The more I think about it, we could accomplish much of this using a single rule in Rule Machine. Let me try to create something to share with you.

OK, here is RM Rule # 1 which handles your # 1 request

Here is RM Rule # 2 which handles your # 2, 3, 4, & 6

Here is RM Rule # 3 which handles your # 7 and 8

1 Like

Your #4 is the only one I haven't handled, since you want the option of not having it execute. Personally, I would simply turn on the bedroom lamp earlier in the evening. This way you can turn it off when you go to bed and not worry about it waking you up.

There are ways to disable an automation, but it would involve the user havng to remember to press a button on a button controller, or issue a voice command to Alexa or Google, or firing up a Dashboard.

I am a fan of the KISS principle, so Simply turning the light on an hour earlier would probably resolve this issue. Or you could use a motion detector that is only active during certain windows of time.

Wow!! Thank you SO MUCH for these examples I am going to print them all out and then start trying to implement them tomorrow. You have certainly made it look pretty easy.
I knew that #4 was going to be an odd-ball. The reason for trying to set this one up is that we travel quite a bit and I am trying to make the house look occupied when we are gone and that includes a "window" when we might be getting ready for bed.

Wondering if there might be some mechanism for disabling the light switch if my iPhone was close by - it always sits on the night table when I go to bed.

1 Like