Control lights based on the time of day


I have set up my lights in my room to be cooler and brighter during the day, but warmer and softer at night to help me fall asleep faster. However, as of right now, this only works when I turn the lights on.
So, the lights get turned on, ST checks the time of day and applies the corresponding brightness and temperature levels.

However, if the light is on and the time changes from one “zone” to another, it doesn’t automatically change the lights settings without me physically turning it off and then back on. Is there a way to make so that I don’t have to do that, and it just updates the light settings to whatever it needs to be based on time?

Thank you in advance!

You have to do another automation where the IF trigger is the exact time of the start of the night mode period of the lights.


time = xx


Set light to level and color temperature needed


@Mariano_Colmenarejo is right. One thing you should add to the IF side is a precondition that the light is ON. That way it doesn’t turn the light on at that time every day if its off.


You are absolutely right, that precondition is necessary

Wouldn’t the Circadian option available with some drivers address this?

1 Like

I’ve done it like this adding the condition that the light is on and it seems to work flawlessly, thank you ^^ Though it’s annoying to have six different routines just to do basically the same thing at three different time frames of the day


You can also change Level and light Temperature when light is off. That way if someone turns light manually it would be set on specific Level and Light Temperature.

Mariano has a driver for the zigbee light bulbs that does have some Circadian Light capabilities, but light needs to be on.

1 Like

The circadian function works by adjusting the level and color temperature every 10 minutes when it is on between 6 am and 6 pm.

When it is off and the time is between 6 am and 6 pm, it waits for it to turn on and calculates the level and color temperature for that instant of day.

If it is not within that period, it turns on with the last values of level and color temperature that worked

1 Like