Migrate wemo light tests to use Kelvin (#133031)

This commit is contained in:
epenet 2024-12-12 20:28:08 +01:00 committed by GitHub
parent 56db536883
commit fd811c85e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,7 @@ from homeassistant.components.homeassistant import (
)
from homeassistant.components.light import (
ATTR_COLOR_MODE,
ATTR_COLOR_TEMP,
ATTR_COLOR_TEMP_KELVIN,
ATTR_SUPPORTED_COLOR_MODES,
DOMAIN as LIGHT_DOMAIN,
ColorMode,
@ -116,7 +116,7 @@ async def test_light_update_entity(
blocking=True,
)
state = hass.states.get(wemo_entity.entity_id)
assert state.attributes.get(ATTR_COLOR_TEMP) == 432
assert state.attributes.get(ATTR_COLOR_TEMP_KELVIN) == 2314
assert state.attributes.get(ATTR_SUPPORTED_COLOR_MODES) == [ColorMode.COLOR_TEMP]
assert state.attributes.get(ATTR_COLOR_MODE) == ColorMode.COLOR_TEMP
assert state.state == STATE_ON