Improve deCONZ test_non_color_light_reports_color (#114021)

This commit is contained in:
Robert Svensson 2024-03-22 22:18:22 +01:00 committed by GitHub
parent 7d9fa64a66
commit d3c68303b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1322,12 +1322,10 @@ async def test_non_color_light_reports_color(
await mock_deconz_websocket(data=event_changed_light)
await hass.async_block_till_done()
assert hass.states.get("light.group").attributes[ATTR_COLOR_MODE] == ColorMode.XY
# Bug is fixed if we reach this point
# device won't have neither color temp nor color
with pytest.raises(AssertionError):
assert hass.states.get("light.group").attributes.get(ATTR_COLOR_TEMP) is None
assert hass.states.get("light.group").attributes.get(ATTR_HS_COLOR) is None
group = hass.states.get("light.group")
assert group.attributes[ATTR_COLOR_MODE] == ColorMode.XY
assert group.attributes[ATTR_HS_COLOR] == (40.571, 41.176)
assert group.attributes.get(ATTR_COLOR_TEMP) is None
async def test_verify_group_supported_features(