From a2bbe092c1fb78420ac665c21b192c879f263c53 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 2 Dec 2026 13:18:46 +0100 Subject: [PATCH] Use the action field enums in lyric (#195960) --- homeassistant/components/lyric/climate.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/lyric/climate.py b/homeassistant/components/lyric/climate.py index b5e372a6d7d6..98890700c6b7 100644 --- a/homeassistant/components/lyric/climate.py +++ b/homeassistant/components/lyric/climate.py @@ -10,22 +10,16 @@ from aiolyric.objects.device import LyricDevice from aiolyric.objects.location import LyricLocation from homeassistant.components.climate import ( - ATTR_TARGET_TEMP_HIGH, - ATTR_TARGET_TEMP_LOW, FAN_AUTO, FAN_DIFFUSE, FAN_ON, ClimateEntity, ClimateEntityFeature, + ClimateServiceArgument, HVACAction, HVACMode, ) -from homeassistant.const import ( - ATTR_TEMPERATURE, - PRECISION_HALVES, - PRECISION_WHOLE, - UnitOfTemperature, -) +from homeassistant.const import PRECISION_HALVES, PRECISION_WHOLE, UnitOfTemperature from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -307,8 +301,8 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity): return device = self.device - target_temp_low = kwargs.get(ATTR_TARGET_TEMP_LOW) - target_temp_high = kwargs.get(ATTR_TARGET_TEMP_HIGH) + target_temp_low = kwargs.get(ClimateServiceArgument.TARGET_TEMP_LOW) + target_temp_high = kwargs.get(ClimateServiceArgument.TARGET_TEMP_HIGH) if device.changeable_values.mode == LYRIC_HVAC_MODE_HEAT_COOL: if target_temp_low is None or target_temp_high is None: @@ -333,7 +327,7 @@ class LyricClimate(LyricDeviceEntity, ClimateEntity): mode=mode, ) else: - temp = kwargs.get(ATTR_TEMPERATURE) + temp = kwargs.get(ClimateServiceArgument.TEMPERATURE) _LOGGER.debug("Set temperature: %s", temp) if self.hvac_mode == HVACMode.COOL: update = self._update_thermostat(