mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 10:48:01 +02:00
Migrate emulated_hue light tests to use Kelvin (#133006)
This commit is contained in:
@ -793,7 +793,10 @@ async def test_put_light_state(
|
|||||||
await hass_hue.services.async_call(
|
await hass_hue.services.async_call(
|
||||||
light.DOMAIN,
|
light.DOMAIN,
|
||||||
const.SERVICE_TURN_ON,
|
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,
|
blocking=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -802,8 +805,10 @@ async def test_put_light_state(
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
hass_hue.states.get("light.ceiling_lights").attributes[light.ATTR_COLOR_TEMP]
|
hass_hue.states.get("light.ceiling_lights").attributes[
|
||||||
== 50
|
light.ATTR_COLOR_TEMP_KELVIN
|
||||||
|
]
|
||||||
|
== 20000
|
||||||
)
|
)
|
||||||
|
|
||||||
# mock light.turn_on call
|
# mock light.turn_on call
|
||||||
@ -1785,7 +1790,7 @@ async def test_get_light_state_when_none(
|
|||||||
light.ATTR_BRIGHTNESS: None,
|
light.ATTR_BRIGHTNESS: None,
|
||||||
light.ATTR_RGB_COLOR: None,
|
light.ATTR_RGB_COLOR: None,
|
||||||
light.ATTR_HS_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_XY_COLOR: None,
|
||||||
light.ATTR_SUPPORTED_COLOR_MODES: [
|
light.ATTR_SUPPORTED_COLOR_MODES: [
|
||||||
light.COLOR_MODE_COLOR_TEMP,
|
light.COLOR_MODE_COLOR_TEMP,
|
||||||
@ -1813,7 +1818,7 @@ async def test_get_light_state_when_none(
|
|||||||
light.ATTR_BRIGHTNESS: None,
|
light.ATTR_BRIGHTNESS: None,
|
||||||
light.ATTR_RGB_COLOR: None,
|
light.ATTR_RGB_COLOR: None,
|
||||||
light.ATTR_HS_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_XY_COLOR: None,
|
||||||
light.ATTR_SUPPORTED_COLOR_MODES: [
|
light.ATTR_SUPPORTED_COLOR_MODES: [
|
||||||
light.COLOR_MODE_COLOR_TEMP,
|
light.COLOR_MODE_COLOR_TEMP,
|
||||||
|
Reference in New Issue
Block a user