From 2c255dd08238f0e38df25d609ad2b30ee30488fa Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 1 Dec 2026 13:23:56 +0100 Subject: [PATCH] Use the action field enums in intellifire (#195791) --- homeassistant/components/intellifire/climate.py | 5 +++-- homeassistant/components/intellifire/light.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/intellifire/climate.py b/homeassistant/components/intellifire/climate.py index 984a2fc957ca..02ac500afed6 100644 --- a/homeassistant/components/intellifire/climate.py +++ b/homeassistant/components/intellifire/climate.py @@ -6,9 +6,10 @@ from homeassistant.components.climate import ( ClimateEntity, ClimateEntityDescription, ClimateEntityFeature, + ClimateServiceArgument, HVACMode, ) -from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature +from homeassistant.const import UnitOfTemperature from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -81,7 +82,7 @@ class IntellifireClimate(IntellifireEntity, ClimateEntity): @override async def async_set_temperature(self, **kwargs: Any) -> None: """Turn on thermostat by setting a target temperature.""" - raw_target_temp = kwargs[ATTR_TEMPERATURE] + raw_target_temp = kwargs[ClimateServiceArgument.TEMPERATURE] self.last_temp = int(raw_target_temp) LOGGER.debug( "Setting target temp to %sc %sf", diff --git a/homeassistant/components/intellifire/light.py b/homeassistant/components/intellifire/light.py index 54864f3ae558..37b47a632203 100644 --- a/homeassistant/components/intellifire/light.py +++ b/homeassistant/components/intellifire/light.py @@ -8,10 +8,10 @@ from intellifire4py.control import IntelliFireController from intellifire4py.model import IntelliFirePollData from homeassistant.components.light import ( - ATTR_BRIGHTNESS, ColorMode, LightEntity, LightEntityDescription, + LightServiceArgument, ) from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -68,8 +68,8 @@ class IntellifireLight(IntellifireEntity, LightEntity): @override async def async_turn_on(self, **kwargs: Any) -> None: """Instruct the light to turn on.""" - if ATTR_BRIGHTNESS in kwargs: - light_level = int(kwargs[ATTR_BRIGHTNESS] / 85) + if LightServiceArgument.BRIGHTNESS in kwargs: + light_level = int(kwargs[LightServiceArgument.BRIGHTNESS] / 85) else: light_level = 2