Add ZHA configuration number entity to set/get thermostat cluster local temperature offset (#105765)

pull/106504/head
theorlangur 2023-12-27 21:16:03 +01:00 committed by GitHub
parent 11e4dd0764
commit d0409e719b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View File

@ -110,6 +110,7 @@ class ThermostatClusterHandler(ClusterHandler):
"max_heat_setpoint_limit": True,
"min_cool_setpoint_limit": True,
"min_heat_setpoint_limit": True,
"local_temperature_calibration": True,
}
@property

View File

@ -20,6 +20,7 @@ from .core.const import (
CLUSTER_HANDLER_COLOR,
CLUSTER_HANDLER_INOVELLI,
CLUSTER_HANDLER_LEVEL,
CLUSTER_HANDLER_THERMOSTAT,
SIGNAL_ADD_ENTITIES,
SIGNAL_ATTR_UPDATED,
)
@ -947,3 +948,21 @@ class AqaraThermostatAwayTemp(ZHANumberConfigurationEntity):
_attr_mode: NumberMode = NumberMode.SLIDER
_attr_native_unit_of_measurement: str = UnitOfTemperature.CELSIUS
_attr_icon: str = ICONS[0]
@CONFIG_DIAGNOSTIC_MATCH(cluster_handler_names=CLUSTER_HANDLER_THERMOSTAT)
# pylint: disable-next=hass-invalid-inheritance # needs fixing
class ThermostatLocalTempCalibration(ZHANumberConfigurationEntity):
"""Local temperature calibration."""
_unique_id_suffix = "local_temperature_calibration"
_attr_native_min_value: float = -2.5
_attr_native_max_value: float = 2.5
_attr_native_step: float = 0.1
_attr_multiplier: float = 0.1
_attribute_name = "local_temperature_calibration"
_attr_translation_key: str = "local_temperature_calibration"
_attr_mode: NumberMode = NumberMode.SLIDER
_attr_native_unit_of_measurement: str = UnitOfTemperature.CELSIUS
_attr_icon: str = ICONS[0]

View File

@ -724,6 +724,9 @@
},
"quick_start_time": {
"name": "Quick start time"
},
"local_temperature_calibration": {
"name": "Local temperature offset"
}
},
"select": {