Fix Tasmota color scaling and RGBW lights (#50120)

This commit is contained in:
Erik Montnemery
2021-05-05 17:59:26 +02:00
committed by GitHub
parent 40a18c10a0
commit 4136f9f203
2 changed files with 21 additions and 9 deletions

View File

@@ -855,8 +855,8 @@ async def test_sending_mqtt_commands_rgbw(hass, mqtt_mock, setup_tasmota):
)
mqtt_mock.async_publish.reset_mock()
# Set color when setting brighter color than white
await common.async_turn_on(hass, "light.test", rgbw_color=[128, 64, 32, 16])
# Set color when setting white is off
await common.async_turn_on(hass, "light.test", rgbw_color=[128, 64, 32, 0])
mqtt_mock.async_publish.assert_called_once_with(
"tasmota_49A3BC/cmnd/Backlog",
"NoDelay;Power1 ON;NoDelay;Color2 128,64,32",
@@ -865,7 +865,7 @@ async def test_sending_mqtt_commands_rgbw(hass, mqtt_mock, setup_tasmota):
)
mqtt_mock.async_publish.reset_mock()
# Set white when setting brighter white than color
# Set white when white is on
await common.async_turn_on(hass, "light.test", rgbw_color=[16, 64, 32, 128])
mqtt_mock.async_publish.assert_called_once_with(
"tasmota_49A3BC/cmnd/Backlog",