How to adjust LED light temperature accordingly to that of daylight at different time of day

Hi All,

Kelvin temperature of daylight changes all day long.
In one sentence, I would like to adjust LED light temperature accordingly to that of daylight at different time of day.

Recently I was struggling with TCS34725 sensor as in theory it’s not that bad, however with ESPHome I was not able to force sensor to show reliable values (fluctuations between reading are too significant). I was playing with
Median, gain and integration_time setup but without luck, so I’m not certain if that was the best choice.

Does any of you have other hardware which you know would be the best for this project?

I know Flux, but it does not give real time adjustments therfore I’m thinking about hardware solution. https://www.home-assistant.io/integrations/flux

Thank You in advance

Have you tried to adjust the update interval? If not try something like

update_interval: 600s

that way it slows its read and response time down.

After a year…Have you been using the light color temperature data in your lightning? About to try it myself, either with the TCS34725 or VEML6040 (which at least in my experiments with Arduino provides stable enough measurements).

Tried ESPHome integrated TCS34725. Yes, it’s pretty useless. If I take the Adafruit code (https://github.com/adafruit/Adafruit_TCS34725) it works quite well. I guess need to study ESPHome and custom sensor coding :nerd_face: So, perhaps takes one more year to get this working…

I anyone has a working light temperature sensor setup, please share!!

can’t you use time of day to estimate curent colour temp?

maybe there is published table for location vs month vs time vs colour temp?

or you could program something pretty close using inputs of

  1. expected colour temp at sunrise
  2. expected colour temp at sunset
  3. length of day

and then fade from 1 to 2 over a period of 3

obviously legnth of day varies over the year, i suspect colour temps at sunrise/sunset will too but surely not enough to be an issue? i.e. you’ll still get blue light in morning and red at night and everything in between, err, in between.

Yes a rought estimation can be used, which is much better than nothing. E.g. Adaptive Lightning integration works well in Home Assistant.
The thing is, that ‘fixed’ CCT estimations do not take into account varying conditions apart from the sunrise/sunset times. CCT has seasonal variation, also, like you noted. More importantly, changing wheather conditions have a remarkable effect on the CCT. Blue sky can be up to 20 000 K, while overcast can be less than half of that.
My goal is to measure the current CCT from outside, then adjust the lightning according to that (and perhaps measure the resulting lightning and then dynamically tune that until they are the same).
Someone must have implemented that sort of system in HA?

well it sounds like an interesting project! not sure if i agree that someone ‘must have implemented that sort of system’ though - i’m struggling to imagine a use-case that requires such accurate and responsive colour changing… is this just for pleasant home lighting or just a stepping stone to something else?

Hi all. Just wondering if any of you happened to get this going? I’m looking to make a wee hobby project, that is, collecting data with the TCS34725 from outside and sending to lights inside. Would love to share code or ideas if you have any!

EDIT: Removed original post and made a separate topic: