Do not allow mqtt lights to set brightness to zero (#91296)

* Do not allow mqtt lights to set brightness to zero

* Loglevel to debug

* Typo
This commit is contained in:
Jan Bouwhuis
2023-04-14 09:01:29 +02:00
committed by GitHub
parent 025e1792db
commit fc8c5f1bbd
6 changed files with 78 additions and 8 deletions

View File

@ -330,6 +330,12 @@ async def test_state_brightness_color_effect_temp_change_via_topic(
light_state = hass.states.get("light.test")
assert light_state.attributes["brightness"] == 100
# ignore a zero brightness
async_fire_mqtt_message(hass, "test_light_rgb", "on,0")
light_state = hass.states.get("light.test")
assert light_state.attributes["brightness"] == 100
# change the color temp
async_fire_mqtt_message(hass, "test_light_rgb", "on,,195")