Extend ZHA thermostat local temperature calibration range for Sonoff TRVZB (#109691)

* Extend thermostat local temperature calibration range

* Extend thermostat local temperature calibration range only for TRVZB

* Change _attr_native_min_value and _attr_native_max_value back to -2.5 and 2.5

* Adjust _attr_native_step for TRVZB to 0.2

* Implement requested changes

* Fix platform for MULTI_MATCH

* Implement requested changes

* Implement requested changes
This commit is contained in:
Nils Bergmann 2024-02-27 14:32:23 +01:00 committed by GitHub
parent d7fb949994
commit 08497db358
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -953,7 +953,10 @@ class AqaraThermostatAwayTemp(ZHANumberConfigurationEntity):
_attr_icon: str = ICONS[0]
@CONFIG_DIAGNOSTIC_MATCH(cluster_handler_names=CLUSTER_HANDLER_THERMOSTAT)
@CONFIG_DIAGNOSTIC_MATCH(
cluster_handler_names=CLUSTER_HANDLER_THERMOSTAT,
stop_on_match_group=CLUSTER_HANDLER_THERMOSTAT,
)
# pylint: disable-next=hass-invalid-inheritance # needs fixing
class ThermostatLocalTempCalibration(ZHANumberConfigurationEntity):
"""Local temperature calibration."""
@ -971,6 +974,20 @@ class ThermostatLocalTempCalibration(ZHANumberConfigurationEntity):
_attr_icon: str = ICONS[0]
@CONFIG_DIAGNOSTIC_MATCH(
cluster_handler_names=CLUSTER_HANDLER_THERMOSTAT,
models={"TRVZB"},
stop_on_match_group=CLUSTER_HANDLER_THERMOSTAT,
)
# pylint: disable-next=hass-invalid-inheritance # needs fixing
class SonoffThermostatLocalTempCalibration(ThermostatLocalTempCalibration):
"""Local temperature calibration for the Sonoff TRVZB."""
_attr_native_min_value: float = -7
_attr_native_max_value: float = 7
_attr_native_step: float = 0.2
@CONFIG_DIAGNOSTIC_MATCH(
cluster_handler_names=CLUSTER_HANDLER_OCCUPANCY, models={"SNZB-06P"}
)