Nice! Thank you!
Please share it to a seperate post where you can also maintain it
I will consider that.
It would be awesome to have one wakeuplight-script to rule them all
It’s such a generic feature that it makes sense to have that.
For now, I won’t share it separately because I don’t really know if it exists anywhere else.
I can’t imagine that it doesn’t, but haven’t found it yet.
If there isn’t, then I will consider it.
In the meantime, you can consider using the kelvin method I proposed in the code.
For your usecase, that would be a better way to handle the “color_temp” situation.
The kelvin method you proposed unfortunately would fail if user gives values outside the lamp’s ranges, or if there are lamps with variable ranges (not all the entities have the same values).
I am rebuilding the script to get the max/min values from the entities itself.
I’m testing it and will update it in the next minutes.
So I have updated the script, should also work just as wakeup light if there are entities with brightness color_mode.
Also it will change the color temperature based on each entity seperately.
Needs testing
@zynth, @urnlahzer can you please test it?
NEW UPDATE
WLED entities that include the Sunrise effect are also supported
When I call the script from dev tools all is working fine.
Using it through an automation gives high brightness / weird transitions at the beginning.
Wondering if someone else also has this issue? I’m using a Lidl led strip over Zigbee.
Thinking it maybe has to do with Light transition not working - Simple light transition - Configuration - Home Assistant Community (home-assistant.io)
Seems to be a general issue that isn’t related to the script. Sorry I don’t think I can help with that
Is it possible to force CCT mode with lights that has RGB as well?
Not with the current code. Will implement that asap
I have updated the script to support that. You can use the cct:
variable to achieve that.
Also please notice the breaking change. The variable brightness:
now is used for the entities to be forced only to dim and the new variable for the maximum brightness is max_brightness:
Please check it and reply if it works as intended, unfortunately I’m unable to test it
Works perfectly! Thank you!
I updated the script some minutes ago, please double check if you have the latest one
Just wanted to say thanks! My Kasa bulbs don’t support transitions and this somehow works well! Really appreciate the effort here.
That comment made my day!
You are very welcome
Thanks so much for this. Your version works perfectly for me!
Hi, the updated one still causes ALL my lights to turn on rather than the ones called in the automation. I tried the script @zynth posted and that worked. I think it’s a function of the way my light switches work (I have Zooz, he has Shelly, but same issue that caused his not to work seems to apply to mine).
Nevertheless, thanks so much for starting this thread and for trying to get yours to work for me.
Let’s say I wanted to use the sunrise palette BUT THEN move to regular warm white, or maybe move through some of the warmer whites towards daylight white. Would that be doable? Do most bulbs treat “temperatures” of white as a completely different mode from RGB colors?
Yes it is doable, but not with the current script. You should do the CCT transition after the RGB Colour Palette done it’s thing…
Oh, that’s a good idea. I was trying to figure out how to work it into the script, but I suppose I could have the automation run the script, and then run another of my own creation that transitions to warm white and then on to daylight.
Hi there! really great script, I have been using it per months!
Now, I have change the firmware int he desklamp I am using it, unfortunatly, due to this change my lamp doesn’t work for brigthness below 5%, how can stablish a min_bri in the script? I was trying setting a max value between the one is being calculate and this 5 to reach always this min value for brightness_pct but it doesn’t work and I am so lost in here
I tried this:
brightness_pct: {{ [ [maxbri, ((repeat.index * maxbri) / 100)] | min, 5] | max }}
Could you help me?