I have the SYLVANIA LIGHTIFY by Osram - 65W BR30 paired with the smartthings hub. I managed to get color temperature working with the following. Be aware I have just started working with Home Assistant and am no where near calling myself a coder, more so an adjuster of code. Hopefully this helps with a
My light component:
- platform: mqtt
name: “Kitchen 3”
state_topic: “smartthings/Kitchen 3/switch”
command_topic: “smartthings/Kitchen 3/switch”
brightness_state_topic: “smartthings/Kitchen 3/level”
brightness_command_topic: “smartthings/Kitchen 3/level”
brightness_scale: 100
white_value_command_topic: "smartthings/Kitchen 3/colorTemperature"
white_value_state_topic: "smartthings/Kitchen 3/colorTemperature"
payload_on: “on”
payload_off: “off”
retain: true
Files modified:
homeassistant/components/light/mqtt.py LINE 59
DEFAULT_WHITE_VALUE_SCALE = 255 changed to DEFAULT_WHITE_VALUE_SCALE = 6500
I tried using the color_temp_value_template variable mentioned in other posts but it had no effect for me in controling the lgiht. The the white value had referenced to scale in the python code so increasing the scale to the maxzimum of the bulb allows the slider in the UI to send the correct number but it is still sending this value to the colorTemperature value that smartthings expects.
The outstanding issue of this is that the UI slider still goes from 1 to 6500 so the low end does not match the lowest value the bulb will accept. Also, this hack is in core files that will most likely get over written during an update.
This pull request appears to be on the right track to fix some of this with the color_temp configuration variables but doesn’t look to address the Mired to Kelvin issue.
Referenced
Posts Referenced
MQTT Light Outgoing Template?
Color Temperature Min/Max, Units, and UI