Light_profiles.csv help

Hi everyone,

I have recently set up HA and have come across the light_profiles.csv option.

The doesn’t seem to be very good documentation for exactly how to use this. It states this in the documentation:

To set the default color and brightness values when the light is turned on, create a custom light_profiles.csv (as described below in the profile attribute of light.turn_on ).

The .default suffix should be added to the entity identifier of each light to define a default value, e.g., for light.ceiling_2 the id field is light.ceiling_2.default . To define a default for all lights, the identifier group.all_lights.default can be used. Individual settings always supercede the all_lights default setting.

The “as described below” information it this:

String with the name of one of the built-in profiles(relax, energize, concentrate, reading) or one of the custom profiles defined in light_profiles.csv in the current working directory. Light profiles define an xy colour and a brightness. If a profile is given and a brightness then the profile brightness will be overwritten.

Now the example file given shows this:

id,x,y,brightness
Relax,0.5128,0.4147,200
Concentrate,0.3693,0.3695,200
Reading,0.4448,0.4066,200
Energise,0.3151,0.3252,200

So my questions are:

  1. The first line in the example - id,x,y,brightness. Do you include this line in the actual light_profiles.csv or is it just there to tell you what the values below it are?

  2. Again about the first line in the example: Can you specify different things in this such as rgb? So instead it would be something like this:

id,r,g,b,brightness
Relax,1,1,1,100

  1. What exactly is the id field made up of? In the example it just uses names for each profile. But it says in the documentation for example: To define a default for all lights, the identifier group.all_lights.default can be used.

So how would it look in the light_profiles.csv if I want to define a default profile for all lights? Would it be like this:

id,x,y,brightness
Relax,0.5128,0.4147,200
Concentrate,0.3693,0.3695,200
Reading,0.4448,0.4066,200
Energise,0.3151,0.3252,200
group.all_lights.default, 0.5,0.5,200

  1. What is the maximum value for brightness?

  2. Is there a simple way to get the x,y and brightness values for a colour I want (the link they provide for Phillips you have to sign up etc - I would just like a colour picker but all the ones I have found are for x,y,z - I cant seen to just find a colour picker that will give me x,y or x,y and brightness)

Sorry it is a lot of questions, but hopefully this will act as good supplemental info for anyone else who wants to use light_profiles.csv and are a little confused about how to use it.

Many thanks,
Gary.

1 Like

I tried this light_profiles.csc

id,x,y,brightness
Relax,0.5128,0.4147,200
Concentrate,0.3693,0.3695,200
Reading,0.4448,0.4066,200
Energise,0.3151,0.3252,200
group.all_lights.default,0.6,0.2,50

However when I turn a light off and on it doesnt use what I have set here.

1 Like

Can someone please help and tell me where on HASS.IO the “light_profiles.csv” file it located??? so lost!

It should be in config folder

I’ve created light_profiles.csv in config.dir.

I can set lights to profiles in light_profiles.csv using service calls.

I can see how one can set the default for all lights using an automation.

My question is - How to set the default profile for all lights (including new additional lights) without an automation ?

I suspect (hope) I’m just missing something basic, but maybe it just can’t be done.

Thanks,

1 Like

Switch to scenes :wink:

I read in this discussion that you have to remove the id,x,y,brightness header from your .csv file for it to work.

I know it’s probably just a typo in your write-up but just pointing out your filename is noted as .csc not .csv

Any update on this? I basically wonder about all the same questions as in the original post. I just want all my lights to update to 100% brightness when they turn on, not to go back to the brightness I had when I switch them off. Not much information online about this topic.

2 Likes