I have a LED strip (RGBW) where I can control each channel separately by defining a KNX light for every channel. I can now set every color by manually dimming those lights (ledstrip_R, ledstrip_G, ledstrip_B, ledstrip_W).
Is there any way to combine those channels into one Light entity so that I can set the color with the color picker?
Write a script that accepts 3 values. The script should use each of those values for each light. Whenever you want to set a color, call the script and supply it with the 3 values.
The last 2 examples in the link show you how to pass variables to a script.
How can I manage to call this script because I selected a color in the color picker? Can I somehow create another light entity where I can attach my script?
You can use a switch template or light template that will show up as a toggle in Home assistant. Then in the turn_on, turn_off sections of those functions, you can call a script. I’m not sure if you can specify a color with those devices, but you could have a separate input_select that defines the color when those devices turn on.
This may be more than you wanted to do. But I use this fine code by BRUH to control LED strips
Put the code on an ESP8266, and then you can integrate it right into HA. If you want multiple lights to be controlled by the same entity, you just subscribe the ESP connected to each strip to the same MQTT topic. I have status lights around my house that alert me to driveway motion, door entry, water leaks, Internet outage, etc.
I can also set the color for all my LED strips via one entity in the HA UI
I’ve now found a way to solve this. I created a mqtt_json light, which is listening to a dummy topic. This will probably also work with other lights, but mqtt_json supports RGB and white channel:
This is the same method the BRUH Automation guy uses in his code. JSON. Since I use his code my lights behave exactly as you described. I have all mine on the same MQTT topic, but one certainly wouldn’t have to limit it to one topic