From 3ac52e290f988bbac7445723d9bcc405fc22bb22 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 30 Nov 2026 18:55:02 +0100 Subject: [PATCH] Use the action field enums in eurotronic_cometblue (#195641) --- .../components/eurotronic_cometblue/climate.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/eurotronic_cometblue/climate.py b/homeassistant/components/eurotronic_cometblue/climate.py index ae3a7b35b11c..2e839963bef0 100644 --- a/homeassistant/components/eurotronic_cometblue/climate.py +++ b/homeassistant/components/eurotronic_cometblue/climate.py @@ -3,8 +3,6 @@ from typing import Any, override from homeassistant.components.climate import ( - ATTR_TARGET_TEMP_HIGH, - ATTR_TARGET_TEMP_LOW, PRESET_AWAY, PRESET_BOOST, PRESET_COMFORT, @@ -12,9 +10,10 @@ from homeassistant.components.climate import ( PRESET_NONE, ClimateEntity, ClimateEntityFeature, + ClimateServiceArgument, HVACMode, ) -from homeassistant.const import ATTR_TEMPERATURE, PRECISION_HALVES, UnitOfTemperature +from homeassistant.const import PRECISION_HALVES, UnitOfTemperature from homeassistant.core import HomeAssistant from homeassistant.exceptions import ServiceValidationError from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -143,11 +142,13 @@ class CometBlueClimateEntity(CometBlueBluetoothEntity, ClimateEntity): "values": { # manual temperature always needs to be set, # otherwise TRV will turn OFF - "manualTemp": kwargs.get(ATTR_TEMPERATURE) + "manualTemp": kwargs.get(ClimateServiceArgument.TEMPERATURE) or self.native_target_temperature, # other temperatures can be left unchanged by setting them to None - "targetTempLow": kwargs.get(ATTR_TARGET_TEMP_LOW), - "targetTempHigh": kwargs.get(ATTR_TARGET_TEMP_HIGH), + "targetTempLow": kwargs.get(ClimateServiceArgument.TARGET_TEMP_LOW), + "targetTempHigh": kwargs.get( + ClimateServiceArgument.TARGET_TEMP_HIGH + ), } }, )