Skip to content

Commit

Permalink
use correct attr
Browse files Browse the repository at this point in the history
  • Loading branch information
prairiesnpr committed Feb 17, 2025
1 parent 45d5c11 commit 4fa2404
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions zhaquirks/tuya/tuya_thermostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ class WorkingDayV02(t.enum8):
class TuyaThermostat(Thermostat, TuyaAttributesCluster):
"""Tuya local thermostat cluster."""

manufacturer_id_override: t.uint16_t = foundation.ZCLHeader.NO_MANUFACTURER_ID

def __init__(self, *args, **kwargs):
"""Init a TuyaThermostat cluster."""
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -540,12 +538,17 @@ def handle_mcu_version_response(
converter=lambda x: x * 100,
dp_converter=lambda x: x // 100,
)
.tuya_dp(
.tuya_number(
dp_id=27,
ep_attribute=TuyaThermostatHeatCool.ep_attribute,
attribute_name=TuyaThermostatHeatCool.AttributeDefs.local_temperature_calibration.name,
converter=lambda x: x * 100,
dp_converter=lambda x: x // 100,
attribute_name=TuyaThermostat.AttributeDefs.local_temperature_calibration.name,
type=t.int32s,
min_value=-9.9,
max_value=9.9,
unit=UnitOfTemperature.CELSIUS,
step=0.1,
multiplier=0.1,
translation_key="local_temperature_calibration",
fallback_name="Local temperature calibration",
)
.adds(TuyaThermostatHeatCool)
# This should be part of the climate entity, but don't think we can do that yet
Expand Down Expand Up @@ -588,19 +591,19 @@ def handle_mcu_version_response(
translation_key="dead_zone",
fallback_name="Dead zone",
)
# Uncertain if this is the correct method, since we can set both heat and cool abs min
# Uncertain if this is the correct method, since we can set both heat and cool min
.tuya_dp(
dp_id=104,
ep_attribute=TuyaThermostatHeatCool.ep_attribute,
attribute_name=TuyaThermostatHeatCool.AttributeDefs.abs_min_cool_setpoint_limit.name,
attribute_name=TuyaThermostatHeatCool.AttributeDefs.min_cool_setpoint_limit.name,
converter=lambda x: x * 100,
dp_converter=lambda x: x // 100,
)
# Uncertain if this is the correct method, since we can set both heat and cool abs max
# Uncertain if this is the correct method, since we can set both heat and cool max
.tuya_dp(
dp_id=105,
ep_attribute=TuyaThermostatHeatCool.ep_attribute,
attribute_name=TuyaThermostatHeatCool.AttributeDefs.abs_max_heat_setpoint_limit.name,
attribute_name=TuyaThermostatHeatCool.AttributeDefs.max_heat_setpoint_limit.name,
converter=lambda x: x * 100,
dp_converter=lambda x: x // 100,
)
Expand Down

0 comments on commit 4fa2404

Please sign in to comment.