Run Second Action Only At Certain Times

Need some help. Here is what I am trying to do in RM. I would like to unlock the front door and send notification when someone arrives, the easy part. The part I can't figure out, I would also like to turn on the entryway light when someone arrives but I want the light to only turn on if it is after sunset and before 9pm, I would also like the light to turn off after 5 minutes. Is it possible to set all this up in one rule or do I have to use several to accomplish this?

You could do something like...

Trigger event: Someone arrives


Unlock front door
Send notification
If Time Between Sunset and 9:00 PM
   turn on light
   Wait for event --> elapsed time 00:05:00
   turn off light
1 Like

That checks all the boxes....I understand the logic and have no idea how to go about doing that in the hub. Need a little more please. If you can point me in the right direction I would really appreciate it.

There's a really great write-up on RM in the documentation here: Rule 5.1 | Hubitat Documentation

Take a look and see if that helps. Come back with any questions! Lots of people here to help.


What he was showing you was text shorthand for Rule Machine actions. You'll see that around here quite a bit.

Here's the rule he showed, done in RM:

That is what took me for a loop. I was fully expecting to have to write this manually (don't mind that part, some times prefer it). It got me in the right direction. The right up seems to show short hand as well and that part didn't help the confusion. LOL. I was able to get to the right place in the RM conditions after some poking around. I think I have set it up correctly. I will test tomorrow when we lave the house at various times. Attached is what I ended up with. I need to turn on and set to 100% so I used the dim instead since I have other rules running that turn the entry way lights on to 1% at certain times of night.

1 Like

This helped a lot. Thank you.

1 Like

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