adaptive-lighting
adaptive-lighting copied to clipboard
Continue to adapt color temperature down to the sleep temperature after sunset
Continue to adapt color temperature down to the sleep temperature after sunset. Results in a gradually warming light during the night time rather than a fixed color temperature throughout the night time.
This looks good! Have you been testing this at home yourself for sometime?
This looks good! Have you been testing this at home yourself for sometime?
Yeap I’ve got it setup in my house across 4 zones and works like a charm. Try it out, I’ve set a 4500k max temp, 3000k minimum colour temp and a 2000 sleep temp.
See below graph. The blips are due to me switching on and off the adaptive light switch.

Have been using your integration for a few months now, this looks like a very useful addition. @basnijholt do you think you will merge this into next release?
Unfortunately, I haven't had the time to test it myself yet.
I know many people will blindly smash the update button in HACS so I am a bit careful with changing the core logic.
I understand, your point is very valid. Just want to say thanks again, been running your integration for the last few months and it is already amazing in its current form. Looking forward where you will take it in the future.
Thought to comment back- been using it and has been flawlessly since the beginning of Feb.
I really like this idea, a lot. Adaptive Lighting makes everything so smooth you never notice the lighting changes - it's just always perfect. Except when transitioning to sleep mode, which if it's a big change, can be jarring.
Some food for thought: I use the sleep mode a bit differently than others, I think. For most of my lights, I have a 2500K-6536K color temp range, with 25%-100% brightness range for the normal Adaptive Lighting operation. For sleep mode, I have it set to 4500K, 1% brightness. It creates a pleasant moonlight effect, great for walking around at night after you've been sleeping, since it's barely any light - but it's a cool-ish white (like the moon). For some of my fixtures that have bulbs without diffusers, you can even get crisp shadows that look just like moonlight shadows. I love it.
My point is - the functionality in the PR seems like it kind of assumes the sleep color temp is lower (on the kelvin scale) than the min color temp, and that's not how all users use the sleep settings.
Some food for thought: I use the sleep mode a bit differently than others, I think. For most of my lights, I have a 2500K-6536K color temp range, with 25%-100% brightness range for the normal Adaptive Lighting operation. For sleep mode, I have it set to 4500K, 1% brightness. It creates a pleasant moonlight effect, great for walking around at night after you've been sleeping, since it's barely any light - but it's a cool-ish white (like the moon). For some of my fixtures that have bulbs without diffusers, you can even get crisp shadows that look just like moonlight shadows. I love it.
My point is - the functionality in the PR seems like it kind of assumes the sleep color temp is lower (on the kelvin scale) than the min color temp, and that's not how all users use the sleep settings.
Good idea! I stumbled on this effect when about a year ago I replaced my bulbs in the bathrooms with 6500K bulbs. I was worried about how harsh that color temp would appear at night. I reset the (non-smart) dimmers to dim very low. I noticed at night when I turned on the light in the bathroom to the minimum brightness, it gave a very pleasant moonlight effect. I am now embarking on changing as many lights as I can with DIY continuously variable CCT. At first I thought ramp down to low temps at night, but then I remembered the moonlight effect. Not sure what the right approach would be. With the current functionality, you don't get the ramp down (or up) to the sleep mode temp, but sleep mode itself seems to be sufficient if we're not trying to ramp to it's temp. That's sort of how I would prefer it for the moonlight effect when getting up in the middle of the night.
Any update on when this might be merged and released? Thanks!
I've added the config option adapt_until_sleep which defaults to False, as I think a major problem with this PR was changing the core logic without giving users the choice.
We would also need some documentation on this new config option.
We would also need some documentation on this new config option.
I've added a general description to the README but I'm afraid I'm not familiar enough with this PR to explain it more thoroughly.
@basnijholt Hey this PR automerged. It was supposed to wait for all reviewers to approve it and the tests to pass. I'm so sorry.
It's absolutely done though, the config option is the only thing that activates it and it defaults to false.
I already wondered how this suddenly got in. Thanks for explaining and thanks for getting this over the finish line!
@all-contributors please add @igiannakas for code
I just released https://github.com/basnijholt/adaptive-lighting/releases/tag/1.9.0, thanks @igiannakas!
Thank you for the mention 😀