Skip to content

Commit

Permalink
Migrate emulated_hue light tests to use Kelvin (#133006)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Dec 12, 2024
1 parent 006b3b0 commit 6d042d9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tests/components/emulated_hue/test_hue_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,10 @@ async def test_put_light_state(
await hass_hue.services.async_call(
light.DOMAIN,
const.SERVICE_TURN_ON,
{const.ATTR_ENTITY_ID: "light.ceiling_lights", light.ATTR_COLOR_TEMP: 20},
{
const.ATTR_ENTITY_ID: "light.ceiling_lights",
light.ATTR_COLOR_TEMP_KELVIN: 50000,
},
blocking=True,
)

Expand All @@ -802,8 +805,10 @@ async def test_put_light_state(
)

assert (
hass_hue.states.get("light.ceiling_lights").attributes[light.ATTR_COLOR_TEMP]
== 50
hass_hue.states.get("light.ceiling_lights").attributes[
light.ATTR_COLOR_TEMP_KELVIN
]
== 20000
)

# mock light.turn_on call
Expand Down Expand Up @@ -1785,7 +1790,7 @@ async def test_get_light_state_when_none(
light.ATTR_BRIGHTNESS: None,
light.ATTR_RGB_COLOR: None,
light.ATTR_HS_COLOR: None,
light.ATTR_COLOR_TEMP: None,
light.ATTR_COLOR_TEMP_KELVIN: None,
light.ATTR_XY_COLOR: None,
light.ATTR_SUPPORTED_COLOR_MODES: [
light.COLOR_MODE_COLOR_TEMP,
Expand Down Expand Up @@ -1813,7 +1818,7 @@ async def test_get_light_state_when_none(
light.ATTR_BRIGHTNESS: None,
light.ATTR_RGB_COLOR: None,
light.ATTR_HS_COLOR: None,
light.ATTR_COLOR_TEMP: None,
light.ATTR_COLOR_TEMP_KELVIN: None,
light.ATTR_XY_COLOR: None,
light.ATTR_SUPPORTED_COLOR_MODES: [
light.COLOR_MODE_COLOR_TEMP,
Expand Down

0 comments on commit 6d042d9

Please sign in to comment.