Use the action field enums in eurotronic_cometblue (#195641)

This commit is contained in:
epenet
2026-11-30 17:55:02 +00:00
committed by GitHub
parent 7c615ad302
commit 3ac52e290f
@@ -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
),
}
},
)