Restore color_temp handling for lifx.set_state (#82067)

fixes undefined
This commit is contained in:
Avi Miller
2022-11-16 15:42:29 +01:00
committed by Franck Nijhof
parent f8b5a97e72
commit 2a641d1d19
2 changed files with 16 additions and 0 deletions
+9
View File
@@ -1524,6 +1524,15 @@ async def test_lifx_set_state_kelvin(hass: HomeAssistant) -> None:
assert bulb.set_color.calls[0][0][0] == [32000, 0, 25700, 2700]
bulb.set_color.reset_mock()
await hass.services.async_call(
DOMAIN,
"set_state",
{ATTR_ENTITY_ID: entity_id, ATTR_BRIGHTNESS: 255, ATTR_COLOR_TEMP: 400},
blocking=True,
)
assert bulb.set_color.calls[0][0][0] == [32000, 0, 65535, 2500]
bulb.set_color.reset_mock()
async def test_infrared_color_bulb(hass: HomeAssistant) -> None:
"""Test setting infrared with a color bulb."""