Room Lighting Using IF THEN ELSE

I have a rule that essentially does this: (Attached Screenshot)
IF mode is HOLIDAY
Turn on Holiday Lights
Turn on Porch Light
Turn on Driveway Light

Someone said I should use the room lighting app to do this, I looked over the docs and didn't see any examples where you use IF THEN ELSE to do the same thing. IS this possible ( I am sure it is) and does anyone have any examples?

Thank you..

You could probably do it with RL, using the per mode settings. Might be a little more complicated though. RM is well suited for this simple task. If you had larger groups of lights it might easier to manage using RL.

I assume you turn them off at some point? You could add a wait to the end of your rule and then turn it all off again. I would guess right now you have a separate rule?


Yes I have a 2 other rules that accomplish that -
One that turns the porch light off at 11:30 PM and another that turns the driveway lights off 45 mins before sunrise..

I was told not to do all these tasks in one rule in case of some problem.. I didn't understand the dynamic so I went with separate rules...

Either way works, I just prefer to keep as much as possible in one rule, within reason.

But I would say your rule is good. RL is not really designed for timed on/off triggers like that. For example I have a RL "group" for my outdoor lights, but I trigger it going on/off with a rule in RM among other things.

Do you have a separate process to set the MODE to HOLIDAY?

yes i have a run similar for each holiday.

That rule does not do anything.
It only triggers when the mode changes to "HOLIDAY"
Then the action is setting the mode to Holiday?

I saw you posted your original rule from the first post on Facebook and said it did not work. So do you want to convert it to Room Lighting, or just help making it work right? Whats not working?

Morning @jtp10181
I want to figure out why it does not run as it stands.. This is one of 3 items that are not working as intended and my constant fiddling with them is not helping I am sure...

My hope is once I figure this one out, it may shed light on the others..

Your first rule as shown, with Mode NOT set to Holiday, should be turning on the two Outdoor Lights you have set there. Not sure why it would not work. You would need to turn on all the logging options. I would also make sure logging is enabled for those two devices.

I suppose logging is done at the device level and not on the rule itself?

in RM enable all options here:

On the device turn on "Info" logging. You could also try debug logging but usually it turns itself off after 30 minutes.

Glanced right by it..

I turned logging on for everything, events, triggers, and actions..

We will see what happens this evening and will report back…

@jtp10181 Hey Jeff,

To me, why what that log says, it appeared as if the rule turned both lights on, but when I arrived at home last night at 11;30, only the porch light was actually on.. I then grabbed my phone, opened hubitat and clicked run actions on the rule, when I did the driveway lights turned on.....

You can look in the event log (tab on the device page) for that device to determine if it got the command, and if it turned on at that time or not.

You might just have some slight mesh issues, I used to have this problem as well with my outdoor lights and still have a double turn-on in my rule.

I would put both switches in the same "On" line and then have a second one with a 5-10 second delay. It would look something like this below. I am activating a Room Lights group, but you would just turn the lights on directly as you are already. The "Force" option is something for RL that just overrides any RL limits, so you wont see that for the regular On command.


Something like this?

Here is the event,, If I am reading this correctly it turned on and then turned off... ohhh ■■■■, is the halloween turning the light switch off?????

Looks like yes that rule is turning it right back off again.

Dang that event trigger column was the best troubleshooting thing ever added. :clap: @gopher.ny
Cant even imagine the days before that was added, the agony of people trying to figure out what rule they screwed up.

Yes that would work, I would personally put both devices in the same original "on" line (you should be able to select multiple devices), and then put them both in the delayed one as well. Although you may just create more rule battles with the delay by doing that from the looks of things :wink:

1 Like

I bet if this rule...

Why do you have that rule as a toggle? That reverses the current status, if you want it ON you need to change that to ON, not toggle.

So I use HUE lights on the driveway, and one thing that I kinda dislike is that when you turn hue light on, they start at their last state (in my case halloween colors) at midnight I needed them to go back to bright white and could not get that affect using HE. however, if you power them off, then back on, they come on at full brightness and white.