Default turn-on brightness/color temperature for lights

How do you get the Lovelace light card to reset color?

Is it possible from this template to adjust color_temp according to brightness (same as adaptive light from Homekit)?

For example:

If brightness = 255 then color_temp = 181 (Daylight White)
If brightness = 76 then color_temp = 454 (Warm White)

Thanks!

Probably, but that is not what the goal of this blueprint is. The goal is to always turn it on to the same brightness and color no matter what.

You might checkout the Flux integration.

I just made a feature request to get color temp added to light_profiles.csv. It would be great if you all could go vote it up then maybe it would solve all these problems.

2 Likes

I Voted for it!

Hi there !

I’m new to HA and wanted to set a default color for my lights when I power them on.
But this does not seem to do the trick.

If I select this blueprint and set a group to use it, I can only set the “white color”.
There is no color (like red blue etc.).
Is this normal ?
If yes is there a blueprint that allow me to set a default color ?

Welcome to the forum and HA community!
The Home Assistant Community is quite active so you might find your question is already answered. I’ve found some pretty obscure scenarios I had fully documented by other users here. Also, the official documentation is quite good too.

I answered your question when someone asked the same question at the top of this thread here: Default turn-on brightness/color temperature for lights - #5 by Noblewolf

Thanks I’ll check that !

Might try adding a helper that is activated via a scene script or however you run the scenes. Then in the beginning of this blueprint add a condition to check against that helper before it implements this automation.

1 Like

Hi all! Not sure if someone has encountered this.
I noticed that this blueprint only works if I turn off/turn on the light bulbs, but if I turn them off via the switch, they do not get the correct color temp/brightness applied, I have to go in and turn off/on the bulbs after turning them on from the switch.
Any ideas how to fix this?

If it matters, this is on a light group, what does seem to work is on an individual light bulb, i turn off/on via the switch and the color temp/brightness I specified on the blueprint work.

That is interesting. I just tested with a Light Group - Home Assistant and had no issues. I tested with both toggling via the UI and toggling via a Ikea Tradfri switch.

@jaimmor what kind of switch are you using? Can you verify that when you turn the lights off via the switch that your light/light group actually changes to the ‘off’ state? The blueprint only triggers when the light(s) move from an ‘off’ state.

I don’t have any smart switch, it’s just your standard light switch. And yeah I never notice the bulbs go into an off state when I turn the lights off from the switch.

They may just be “unavailable”
My sengled ZigBee bulbs send an off state right after the loose power, but not all bulbs do that.

You can copy the code that is used in this blueprint and replace off with unavailable and it might work for you.

Ah good idea. I’ll give that a shot.

1 Like

Ok so before I tested that I checked on the state of the lights when I turn off the lights from the switch and the state remains as on. When I turn them back on, it then updates its state to off.
It seems i need to figure out how to make the Hue bulbs report an off or unavailable state if the switch is off.

1 Like

Thanks for this - works almost perfect for me!

Like a couple other people in this thread I have several sequences linked to bulbs (mainly flashing red when doors open/motion detected) but these were being ignored as this blueprint was taking priority with default ‘white’ values.

To get around this as part of my sequence to flash the bulbs red, instead of turning the bulbs straight to red, I first turned the bulbs on (whereby it would take the default white values under this blueprint, then ran a 2nd action to flash red.

It’s a bit clunky and not as instant as just flashing red but it’s all I can come up with at the moment - interested to see what solutions other people have had?

Updated blueprint to allow multiple lights selection.

@Noblewolf
Hay i’m very interesting about this blueprint, but i can’t install. There is a error message:

Invalid blueprint: Only one type can be specified. Found entity, multiple for dictionary value @ data[‘blueprint’][‘input’][‘target_lights’][‘selector’]. Got {‘entity’: {‘domain’: ‘light’}, ‘multiple’: True}

Not sure if it’s a Problem of my HA Install? HA 2023.10.5, Supervisor 2023.10.1, OS 11.1
Can you help or give me a Tip, thanks?