From 9dcb4625c8b95e00fecbcefc8eb98864a676c414 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 30 Nov 2026 17:39:52 +0100 Subject: [PATCH] Use the action field enums in ecobee (#195615) --- homeassistant/components/ecobee/climate.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/ecobee/climate.py b/homeassistant/components/ecobee/climate.py index ed1e95d648c8..5fffb22b9fae 100644 --- a/homeassistant/components/ecobee/climate.py +++ b/homeassistant/components/ecobee/climate.py @@ -4,8 +4,6 @@ import collections from typing import Any, override from homeassistant.components.climate import ( - ATTR_TARGET_TEMP_HIGH, - ATTR_TARGET_TEMP_LOW, FAN_AUTO, FAN_ON, PRESET_AWAY, @@ -14,11 +12,11 @@ from homeassistant.components.climate import ( PRESET_SLEEP, ClimateEntity, ClimateEntityFeature, + ClimateServiceArgument, HVACAction, HVACMode, ) from homeassistant.const import ( - ATTR_TEMPERATURE, PRECISION_HALVES, PRECISION_TENTHS, STATE_OFF, @@ -629,9 +627,9 @@ class Thermostat(ClimateEntity): @override def set_temperature(self, **kwargs: Any) -> None: """Set new target temperature.""" - low_temp = kwargs.get(ATTR_TARGET_TEMP_LOW) - high_temp = kwargs.get(ATTR_TARGET_TEMP_HIGH) - temp = kwargs.get(ATTR_TEMPERATURE) + low_temp = kwargs.get(ClimateServiceArgument.TARGET_TEMP_LOW) + high_temp = kwargs.get(ClimateServiceArgument.TARGET_TEMP_HIGH) + temp = kwargs.get(ClimateServiceArgument.TEMPERATURE) if self.hvac_mode == HVACMode.HEAT_COOL and ( low_temp is not None or high_temp is not None