Fix Setpoint in Matter climate platform (#101929)

fix matter max setpoint
This commit is contained in:
Vadym Holoveichuk 2023-10-13 15:09:35 +03:00 committed by GitHub
parent 53e97fee0e
commit 4e9ec82082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -250,9 +250,9 @@ class MatterClimate(MatterEntity, ClimateEntity):
self._attr_min_temp = DEFAULT_MIN_TEMP
# update max_temp
if self._attr_hvac_mode in (HVACMode.COOL, HVACMode.HEAT_COOL):
attribute = clusters.Thermostat.Attributes.AbsMaxHeatSetpointLimit
else:
attribute = clusters.Thermostat.Attributes.AbsMaxCoolSetpointLimit
else:
attribute = clusters.Thermostat.Attributes.AbsMaxHeatSetpointLimit
if (value := self._get_temperature_in_degrees(attribute)) is not None:
self._attr_max_temp = value
else: