mirror of
https://github.com/home-assistant/core.git
synced 2025-06-23 14:37:07 +00:00
Migrate lifx light tests to use Kelvin (#133020)
This commit is contained in:
parent
d02bceb6f3
commit
aa7e024853
@ -9,7 +9,7 @@ import pytest
|
|||||||
|
|
||||||
from homeassistant.components import lifx
|
from homeassistant.components import lifx
|
||||||
from homeassistant.components.lifx import DOMAIN
|
from homeassistant.components.lifx import DOMAIN
|
||||||
from homeassistant.components.lifx.const import ATTR_POWER
|
from homeassistant.components.lifx.const import _ATTR_COLOR_TEMP, ATTR_POWER
|
||||||
from homeassistant.components.lifx.light import ATTR_INFRARED, ATTR_ZONES
|
from homeassistant.components.lifx.light import ATTR_INFRARED, ATTR_ZONES
|
||||||
from homeassistant.components.lifx.manager import (
|
from homeassistant.components.lifx.manager import (
|
||||||
ATTR_CLOUD_SATURATION_MAX,
|
ATTR_CLOUD_SATURATION_MAX,
|
||||||
@ -31,7 +31,6 @@ from homeassistant.components.light import (
|
|||||||
ATTR_BRIGHTNESS_PCT,
|
ATTR_BRIGHTNESS_PCT,
|
||||||
ATTR_COLOR_MODE,
|
ATTR_COLOR_MODE,
|
||||||
ATTR_COLOR_NAME,
|
ATTR_COLOR_NAME,
|
||||||
ATTR_COLOR_TEMP,
|
|
||||||
ATTR_COLOR_TEMP_KELVIN,
|
ATTR_COLOR_TEMP_KELVIN,
|
||||||
ATTR_EFFECT,
|
ATTR_EFFECT,
|
||||||
ATTR_HS_COLOR,
|
ATTR_HS_COLOR,
|
||||||
@ -1263,7 +1262,7 @@ async def test_white_bulb(hass: HomeAssistant) -> None:
|
|||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
LIGHT_DOMAIN,
|
LIGHT_DOMAIN,
|
||||||
"turn_on",
|
"turn_on",
|
||||||
{ATTR_ENTITY_ID: entity_id, ATTR_COLOR_TEMP: 400},
|
{ATTR_ENTITY_ID: entity_id, ATTR_COLOR_TEMP_KELVIN: 2500},
|
||||||
blocking=True,
|
blocking=True,
|
||||||
)
|
)
|
||||||
assert bulb.set_color.calls[0][0][0] == [32000, 0, 32000, 2500]
|
assert bulb.set_color.calls[0][0][0] == [32000, 0, 32000, 2500]
|
||||||
@ -1759,7 +1758,7 @@ async def test_lifx_set_state_kelvin(hass: HomeAssistant) -> None:
|
|||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
"set_state",
|
"set_state",
|
||||||
{ATTR_ENTITY_ID: entity_id, ATTR_BRIGHTNESS: 255, ATTR_COLOR_TEMP: 400},
|
{ATTR_ENTITY_ID: entity_id, ATTR_BRIGHTNESS: 255, _ATTR_COLOR_TEMP: 400},
|
||||||
blocking=True,
|
blocking=True,
|
||||||
)
|
)
|
||||||
assert bulb.set_color.calls[0][0][0] == [32000, 0, 65535, 2500]
|
assert bulb.set_color.calls[0][0][0] == [32000, 0, 65535, 2500]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user