Defaulting lights & light profile - how?

I’ve been at this for days, on and off, and can’t make it work. I think I’m being incredibly dumb but I can’t see where.

I want my light to always come on with the same colour and brightness (e.g. some are warm white), not what it was previously on. In fact I have a bunch of lights which I want a default turn on value, but not the same as each other.

I believe this can be done with .default entries in the light_profile.csv file, in my config library (where config.yaml lives). Documented here

So my light_profile.csv looks like this:

profile,color_x,color_y,brightness,transition
light.office_light.default,0.491,0.383,100
light.overhead.default,0.586,0.387,150,5

But it does nothing, nothing at all, nothing changes!

Do I need to reboot between each change? Or quick reload? (Neither of which made any difference except extending my testing time!)

I don’t think I want an automation or scene as that feels like it might be clumsy compared to the csv approach. But maybe I’m barking up the wrong tree.

Any help or advice greatly appreciated!! Thanks.

Neither, you need to restart home assistant. A host hardware reboot should also have worked though that is like cracking a walnut with a sledgehammer.

I’ve never actually used light profiles but it looks like you have the config correct.

Edit. Looking at some issues on github the documentation may be incorrect. Try this:

id,x,y,brightness,transition
light.office_light.default,0.491,0.383,100
light.overhead.default,0.586,0.387,150,5

Here’s the example included in the source https://github.com/home-assistant/core/blob/cc4e741cfa21973cae47a0726e83ec2e51f8ba97/homeassistant/components/light/light_profiles.csv

Thank you Tom, you have resolved the problem. :slight_smile:

Now all I need do is work out the required xy colours for each light - which I believe I can get from the State once I have the turned-on bulb to the right colour.

Inevitably there will be unforeseen reasons why it doesn’t suit me but at least it does now work!!

Thanks again.

EDIT: Although transitions seem a bit wonky. A TO Link coloured bulb doesn’t seem to take much notice of them, and a LIFX white bulb transitions on and off when I set the time to 10 seconds… I expect I’ll get that sorted but it isn’t what i was trying to achieve anyway.

Thanks for confirming. I’ll update the docs tomorrow.

Transitions have to be supported by the light devices themselves. Not all do.