Hi๐
I seem to be having issues with colortemp on my DALI lights controlled through MQTT.
The lights are controlled just fine - both brightness and temperature - but in my log I find the following:
Logger: homeassistant.components.mqtt.light.schema_template
Source: components/mqtt/light/schema_template.py:256
Integration: MQTT (documentation, issues)
First occurred: October 28, 2023 at 00:32:17 (166418 occurrences)
Last logged: 17:31:22
Invalid color temperature value received
I am not sure which lamp is causing the issue or if itโs related to all lamps or a specific lamp.
I seem to be unable to save the state of the lamps when creating a scene - maybe that is related to the error?
This is the yaml config for the light:
# DALI light TV-Rom 1 Dobbelspot PNY CCT
- schema: template
name: "DALI TV-Rom 1.62.51 CCT 2x8w Spot"
state_topic: "hdl/sc/1.62/51"
command_topic: "hdl/sc/1.62/51/set"
command_on_template: >
{"state": "on"
{%- if brightness is defined -%}
, "level": {{ brightness }}
{%- else -%}
, "level": 255
{%- endif -%}
{%- if color_temp is defined -%}
, "colortemp": {{ [[(1000000 / color_temp | float) | round(0), 2705] | max, 6535] | min }}
{%- endif -%}
}
command_off_template: '{"state": "off", "level": 0}'
state_template: "{% if value_json.level | int > 0 %}on{% else %}off{% endif %}"
brightness_template: "{{ value_json.level }}"
color_temp_template: "{{ (1000000 / value_json.colortemp | float) | round(0) }}"
max_mireds: 370
min_mireds: 153
qos: 1