Light_profiles.csv help


#1

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.


#2

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.