Assign color_mode for mqtt light as ColorMode (#100709)
parent
384adb1c87
commit
a66ad39c4e
|
@ -557,7 +557,7 @@ class MqttLight(MqttEntity, LightEntity, RestoreEntity):
|
|||
_LOGGER.debug("Ignoring empty color mode message from '%s'", msg.topic)
|
||||
return
|
||||
|
||||
self._attr_color_mode = str(payload)
|
||||
self._attr_color_mode = ColorMode(str(payload))
|
||||
get_mqtt_data(self.hass).state_write_requests.write_state_request(self)
|
||||
|
||||
add_topic(CONF_COLOR_MODE_STATE_TOPIC, color_mode_received)
|
||||
|
|
|
@ -3175,9 +3175,9 @@ async def test_reloadable(
|
|||
("state_topic", "ON", None, "on", None),
|
||||
(
|
||||
"color_mode_state_topic",
|
||||
"200",
|
||||
"rgb",
|
||||
"color_mode",
|
||||
"200",
|
||||
"rgb",
|
||||
("state_topic", "ON"),
|
||||
),
|
||||
("color_temp_state_topic", "200", "color_temp", 200, ("state_topic", "ON")),
|
||||
|
|
Loading…
Reference in New Issue