Use ATTR_COLOR_TEMP_KELVIN in alexa (#132733)

This commit is contained in:
epenet
2024-12-09 18:01:24 +01:00
committed by GitHub
parent 9d79d905a4
commit b1217f5792
2 changed files with 2 additions and 2 deletions

View File

@ -359,7 +359,7 @@ async def async_api_set_color_temperature(
await hass.services.async_call(
entity.domain,
SERVICE_TURN_ON,
{ATTR_ENTITY_ID: entity.entity_id, light.ATTR_KELVIN: kelvin},
{ATTR_ENTITY_ID: entity.entity_id, light.ATTR_COLOR_TEMP_KELVIN: kelvin},
blocking=False,
context=context,
)

View File

@ -159,7 +159,7 @@ async def test_api_set_color_temperature(hass: HomeAssistant) -> None:
assert len(call_light) == 1
assert call_light[0].data["entity_id"] == "light.test"
assert call_light[0].data["kelvin"] == 7500
assert call_light[0].data["color_temp_kelvin"] == 7500
assert msg["header"]["name"] == "Response"