Migrate template light tests to use Kelvin (#133025)

This commit is contained in:
epenet 2024-12-12 13:54:22 +01:00 committed by GitHub
parent 5c80ddb891
commit 7bdf034b93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,7 @@ import pytest
from homeassistant.components import light from homeassistant.components import light
from homeassistant.components.light import ( from homeassistant.components.light import (
ATTR_BRIGHTNESS, ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP, ATTR_COLOR_TEMP_KELVIN,
ATTR_EFFECT, ATTR_EFFECT,
ATTR_HS_COLOR, ATTR_HS_COLOR,
ATTR_RGB_COLOR, ATTR_RGB_COLOR,
@ -773,7 +773,7 @@ async def test_temperature_action_no_template(
await hass.services.async_call( await hass.services.async_call(
light.DOMAIN, light.DOMAIN,
SERVICE_TURN_ON, SERVICE_TURN_ON,
{ATTR_ENTITY_ID: "light.test_template_light", ATTR_COLOR_TEMP: 345}, {ATTR_ENTITY_ID: "light.test_template_light", ATTR_COLOR_TEMP_KELVIN: 2898},
blocking=True, blocking=True,
) )
@ -1395,7 +1395,7 @@ async def test_all_colors_mode_no_template(
await hass.services.async_call( await hass.services.async_call(
light.DOMAIN, light.DOMAIN,
SERVICE_TURN_ON, SERVICE_TURN_ON,
{ATTR_ENTITY_ID: "light.test_template_light", ATTR_COLOR_TEMP: 123}, {ATTR_ENTITY_ID: "light.test_template_light", ATTR_COLOR_TEMP_KELVIN: 8130},
blocking=True, blocking=True,
) )
@ -1531,7 +1531,7 @@ async def test_all_colors_mode_no_template(
await hass.services.async_call( await hass.services.async_call(
light.DOMAIN, light.DOMAIN,
SERVICE_TURN_ON, SERVICE_TURN_ON,
{ATTR_ENTITY_ID: "light.test_template_light", ATTR_COLOR_TEMP: 234}, {ATTR_ENTITY_ID: "light.test_template_light", ATTR_COLOR_TEMP_KELVIN: 4273},
blocking=True, blocking=True,
) )