mirror of
https://github.com/home-assistant/core.git
synced 2026-12-03 04:08:19 -04:00
Use the action field enums in eurotronic_cometblue (#195641)
This commit is contained in:
@@ -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
|
||||
),
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user