Convert color temperature to visible color in lights (#55219)

This commit is contained in:
J. Nick Koston 2021-08-25 14:56:36 -05:00 committed by GitHub
parent 59d401e7b7
commit e6e8d7eded
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 49 additions and 24 deletions

View file

@ -1161,6 +1161,9 @@ async def test_light_backwards_compatibility_color_mode(
state = hass.states.get(entity2.entity_id)
assert state.attributes["supported_color_modes"] == [light.COLOR_MODE_COLOR_TEMP]
assert state.attributes["color_mode"] == light.COLOR_MODE_COLOR_TEMP
assert state.attributes["rgb_color"] == (201, 218, 255)
assert state.attributes["hs_color"] == (221.575, 20.9)
assert state.attributes["xy_color"] == (0.277, 0.287)
state = hass.states.get(entity3.entity_id)
assert state.attributes["supported_color_modes"] == [light.COLOR_MODE_HS]