Thank you so much Daniel! I feel welcome. I understand your confusion.
I’d like AL to change the color temperature but AL not to change the brightness. I have found the options for that, which are the same as you show in the printscreens. This is working just fine.
At the same time, i want the brightness to be adjusted via a lux-meter (which is a 1000 times better than using a generic sunrise/sunset schedule).
The challenge is that, normally, I set the brightness via multiple scenes. However, those scenes are containing color temperature settings (which i don’t want, i want to use color temperature from AL). AL is changing the color temperature for me as expected (i disabled “take over control” to make this happen). The problem with this, is that i first see color temperature X when activating the scene, and then color temperature Y from AL. I’d like to see color temperature Y directly, without a weird color temperature change ‘in between’ (X -> Y).
I had a similar issue but the other way round. Bathroom light controlled by Magic Areas came on at 100% and then AL set them to xxx percent so I lowered the initial turn on brightness in Magic Areas and then let AL ramp them up to the set brightness. The other way round at 4 am was an eye opener…
Yeah, sometimes it is good to take step back and to reconsider the strategy, and/or to ask help from the community
See below a small part of one of the scenes. I’m using LIFX and Philips Hue. Hopefully this comes in handy when finetuning/aggregating/separating any commands to solve this puzzle.
In below scenes.yaml, light.woonkamer_subwoofer = Hue, the other two are LIFX.
While looking at this YAML file, I got an idea: would it be possible to add the “color_temp” value as a variable, which comes from AL? This should solve it (in theory)?
(that’s off the top of my head! I’m not great with templates yet, lots of trial and error…)
{{ state_attr('switch.adaptive_lighting_bathroom', 'color_temp_kelvin') }} resolved to 10000 for me
and {{ state_attr('switch.adaptive_lighting_office', 'color_temp_kelvin') }} resolved to 3200 for me in dev tools…
Regarding id: ‘1606727517975’, it is indeed a scene.
If i understand you correctly, ‘color_temp_kelvin’ is the variable from AL for color temperature? That sounds very promising
Modify the script variables by adding two templates to it: one list containing the list of lights, one containing the color temperature value from AL as advised by you:
I’ve got it working. The theory turned out to be true.
The only thing that needed to change, is to use the kelvin service data attribute instead of color_temp (which is using mireds), because AL is providing the value in Kelvin.
See below the solution. Hopefully this will help others as well.
Thanks for your help Daniel! Your advice about the color_temp_kelvin state attribute of AL was vital to get to this solution.
BTW, all 5 color attributes are in the switch.
(Developer Tools is your friend, especially States and Templates!)
Looks like you could have used color_temp_mired…
Noob question:
Is there any way to have the adaptive lighting only affect the color temperature, not the brightness?
I couldn’t find my answer in the documentation.
There’s no way in the configuration setup but…since it creates “switches” for the areas’ brightness and color temp, I believe you would just need to turn the brightness switch off for the area(s) that you want brightness adjustment disabled for.
i did the same thing you did here with adding the color_temp values to the turn_on service call. But my lights only turn on every second time i call the script and i dont know why.
i have 2 scripts. one for turning on one for turning off.
so
script.lights_on -> lights turn on as expected
script.lights_off -> lights turn off as expected
script.lights_on -> nothing (i can even see that the script runs in the logbook and no error in the logs)