I got a few RGBW controllers (Magic Home) and flashed them to use Espurna. (ARILUX_AL_LC06)
Setup the HA and MQTT integration and everything is working like a charm.
Now i also have 2 muller light RGBW remotes and am setting them up to control the lights.
Now hitting a snag with setting the color temp. Well, setting goes fine. But reading the color temp not so much.
These are the states i get from the light:
min_mireds: 153
max_mireds: 500
supported_color_modes:
- color_temp
- hs
color_mode: hs
brightness: 255
hs_color:
- 2
- 100
rgb_color:
- 255
- 8
- 0
xy_color:
- 0.699
- 0.3
friendly_name: RGB Light
supported_features: 59
So it seems there is no way to read out color_temp. But i can send it.
In my automation i have this code:
action:
- service: light.turn_on
target:
entity_id: light.rgb_light
data:
color_temp: 500
Which send the color_temp and works.
What i wanted to do is get the color temp and increase/decrease it like this:
data: >
{% set ct = state_attr('light.rgb_light', 'color_temp') | int %}
{{ [ct+50, 500] | min}}
This just sends ‘50’ because it gets nothing from color_temp.
I’ll prob have to calculate the color_temp from the xy values?