Time Period Changes Do Not Reliably Trigger Activation

I have two Room Lighting(s) set up and both have similar behavior. Despite being configured to "Adjust lights on Time Period changes", they do not reliably trigger activation when the time periods change.

I have attached screenshots of the configuration, lighting periods and filtered logs (with debug).

Room 1:



Room 2 (note that zigbee group is enabled even though I only have one light in the room, I did that intentionally to keep the rooms configured with the same options):



"Adjust lights on Time Period Changes" just updates the activation table and will transition lights that are already activated. It does not turn the lights on.

Your periods that do show "Activating for..." were because the RL instance was already active.

1 Like

This means to adjust them when they are already activated, not to activate them if they are not. To do that you'd have to have Means to Activate for those times.

1 Like

Ah, I see. Would you consider a feature request to add a "Activate lights on Time Period changes" option?

I can use a simple automation rule to turn them on but was hoping to use Room Lighting as an all-in-one replacement to the several Scenes, Groups and Rule Machine rules I had configured before switching to Room Lighting.

With an external activation time trigger I need to keep that time in sync with changes to Room Lighting. It would be super convenient to just have an option to Activate and/or Adjust on Time Period changes so that everything is configured in one place and self contained.

This is definitely an edge case. I'm reluctant to add more options, but I'll consider it.

In the meantime, you could use Hub Variables for the times. Define one for each period start time, and those can be used as Means to Activate as well. This puts all of the times in one place, should you want to change any of them.

Alternatively, are you using Modes? Modes could serve this same purpose, being set by times in a single place, and Room Lights using those for instead of periods for times. These could be used a Means to Activate as well:

I’ll try putting the times in a variable. What about the race condition between a rule that triggers on the time to fire and activate raced against the time period change?

I realize I’m splitting hairs a bit but if the activation fires a little before the time period changes color then the light might flash bright with the wrong color/brightness before receiving the color change. I’ll just end up doing an offset from the variable for my trigger activation rule but like I was saying earlier it would be cleaner and simpler to just have it all set up in Room Lighting.

I haven’t said it yet but thank you for making Room Lighting! It’s very powerful and can greatly simplify some of the custom rules I’ve accumulated. I’m considering replacing about a dozen automation rules that open and close window shades with a single Room Lighting but I’d need to be able to activate on time period changes to do that cleanly.

Oh, never mind the above post. I see your concern, as to which is going to happen first at a given time, the period being set or the activation. I will take a look at that. The Means to Activate in RL could have the 1 second offset from the variable time.

I understand this isn't as sweet as the feature you asked for.

This turns out to be very simple to add, so it will be in the next release. It will be a Means to Activate.

4 Likes

Thanks for adding that feature--it's useful for me as well. But how can I get the room lights to turn off at the designated time period?

Here is my example:
Want switch on at 6am, off at 12noon, on at 6pm, off at 12midnight. Want this to be independent of mode.

I can get the switch to turn on my designated time periods, but I don't see a way to turn them off at the designated time period. (Yes, I realize I can set them to turn off at 6 hours after last activation in this case, but I have other use cases that are not regular.)


You can do one of these in RL itself as a Means to Turn Off. You can do a second one with Rule Machine action to Turn Off RL, triggered at the time you need.

Well, I already had the entire cycle as separate rules. I was hoping to simplify using the RL app, which is why I (test) migrated them over. If there isn't a way to turn on and off at time periods, then I guess I'll just go back to rules. That's much easier to understand than having a mix between apps.

Sorry, I didn't look closely enough at what you showed above. That should work. You can use Activate at Time Periods Start as Means to Activate .

Okay, thanks. But what do I set as "means to turn off lights"? There is no option for time periods. I tried leaving this as "don't turn off" hoping that the settings that I have for activation ("activate at time periods start") and time period states (varying on/off as shown above) would work, but it didn't. Are my time periods set correctly?

I had a similar goal as @Laplacian ... specifically trying to fully specify my room lighting automation with RL. I ended up doing most of it in RL but I have a parallel Rule Machine action that manages turning things on and off.

I found it very confusing to use a time period in RL to specify that lights should be off. When doing this, there is no easy way to turn the light on (i.e. via a physical button or dashboard button configured to always activate the RL). If the time period is configured to have a light off, that light is just going to be off even if RL is force activated.

Instead of having time periods with lights set to be off, I just have a Rule Machine that turns the lights off. This allows a physical/virtual button press to force RL activation which turns the light back on. Example is walking into a room when the lights are off during the day and forcing them to turn on in a way that is outside of their normal schedule.

I think the use cases described so far in this topic could be satisfied entirely within RL if the "Means to Activate Lights" and "Means to Turn Off LIghts" were modified to allow specifying multiple "Time is" events. Perhaps this could be implemented as a button after the single time event saying "add an additional time".

If we can have multiple "Time is" events for both "Means to Activate Lights" and "Means to Turn Off Lights" then we'd be able to fully control turning things on and off that way and we'd be able to leave the "Vary Lighting Using Time Periods" as all periods where the colors and combinations are configured for whatever one would want as the "on" condition at various time periods.

What did or didn't happen? You probably need Activation Option of 'Activate even if already partially activated".

This works just fine for turning the lights on at dusk, shifting to red overnight, and off during the day.


Light didn't turn off during the off time period. It turned on during the activate time period.

I did a quick test with "Activate even if already partially activated" enabled. That seems to fix this, but we'll see how it runs through a day's worth of time periods. Thanks.

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