Christmas light rule question

I been trying to get a rule to turn on two switches for the Christmas lights, it seems to work fine to turn them on once it gets dark, but the part of the rule to shut them back off at 11:30, and then turn them back on at 6am until it gets light out does not work. What am I doing wrong?

You need another trigger for 6:00am. It only will fire when the trigger is encountered.

I'd actually make another rule for that. It's just easier to maintain.

1 Like

Two issues.

One, your IF statements require the time to be exactly 11:30 or 6am. The changes of the sensor creating a lux event at precisely that time are small. Second if the lux sensor is at 1 at 11:30 and still at 1 at 6am, most sensors will not create an event since the value didnt actually change.

1 Like

Oops three issues. Your third IF checks to see if the lux>=900 but the rule will only be triggered if the lux<=21. This IF statement will never be true while the rule is actually running.

1 Like

Ya what Brad said is valid I responded too quickly. I'd make

1 rule to turn on based on LUX (or just set it for sunset that works for me)
1 rule to turn off at 11:30 pm
1 rule to turn on at 6:00 AM
1 rule to turn off once LUX goes up (or just base it on Sunrise)

Seems like a lot but when debugging rules they are easier to fix like this. :grinning:

1 Like

@tivomaniac's right... sunrise and sunset work well and are easily to implement. And then you could combine the 1130 off and 6am on rules if you wanted.

Your first IF is also not needed since the rule is only triggered if the lux<=21. When the rule actually runs that IF will always be true unless the lux drops VERY quickly :slight_smile:

1 Like

And if you do it that way 2 rules would work fine. Here's my rule for my Xmas lights:

2 Likes

Ok, thanks for the help from the both of you. I will split things up into different rules, The only reason I did it all in 1 rule was after the Christmas season it would be easier to just pause one rule then several. I also added a time restriction when it could be triggered by lux due to the logs showing every time a new lux value was reported, it would try to turn back on the lights again, and I did not want to cause any additional zwave network traffic if not needed.

Appreciate the help.

I actually use mode manager to do it all. "Day" is sunrise to sunset, "evening" is sunsetc until midnight, night is midnight to sunrise. More or less. Then you can use motion and mode lighting app instead of RM.

1 Like

Understand about the post-christmas hassle. You could definitely add a "required expression" and give it a date range so the rule only runs at xmas time.

1 Like

One thing about Hubitat there are a myriad of ways to make something happen. :smiley:

2 Likes

And plenty of people to share their opinions as to how!

3 Likes

I may do that as well, once I get things to operate reliable. The old sunset to 11:30 rule I had worked fine, just had to complicate things when I decided to use the lux sensor so things are not going on too early when its a rather bright day.

2 Likes

Just for clarification...

IF (Time is 11:30 PM) will evaluate as true from 11:30.000 PM to 11:30.999 PM.

2 Likes

Since I use the same outdoor GE switches every year. Here is my On & Off RM for my Xmas lights:

Since your rules only have one trigger and that trigger is time, why are you using that same time as a condition in the IF action?

Don't need it. I removed the time in Actions to Run.

Anyone else think these rules are way too complicated? Here is mine, nice and simple. On, wait, Off, wait, On, wait, Off. Made a group so I could easily add or remove devices from the various rules I have.

2 Likes

Agreed. Simple is good, but for some reason I prefer to trigger each on and off event separately. No particular reason... just preference. Some conditions involved, but just to figure out if I'm turning the lights on or off. Since this device is only used for holiday lighting, I use this switch state as a trigger for my other outdoor decorations as well.

The one inconvenience here is that if I want to edit the trigger times, I have to also edit the conditions in the actions to keep them the same. I've never actually done that, so it's not that big of a problem.