From b1217f5792b58e3c96815ed78d8bcc85f15dfaa9 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:01:24 +0100 Subject: [PATCH] Use ATTR_COLOR_TEMP_KELVIN in alexa (#132733) --- homeassistant/components/alexa/handlers.py | 2 +- tests/components/alexa/test_capabilities.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/alexa/handlers.py b/homeassistant/components/alexa/handlers.py index 89e47673f07..21365076def 100644 --- a/homeassistant/components/alexa/handlers.py +++ b/homeassistant/components/alexa/handlers.py @@ -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, ) diff --git a/tests/components/alexa/test_capabilities.py b/tests/components/alexa/test_capabilities.py index a41c2f47b2d..823afd515b2 100644 --- a/tests/components/alexa/test_capabilities.py +++ b/tests/components/alexa/test_capabilities.py @@ -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"