Restore ability to overwrite homekit max temp bound (#34612)

This commit is contained in:
J. Nick Koston 2020-04-23 15:53:31 -05:00 committed by GitHub
parent cc28150253
commit 7ff196d043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,9 +119,11 @@ class Thermostat(HomeAccessory):
self._unit = self.hass.config.units.temperature_unit
min_temp, max_temp = self.get_temperature_range()
# Homekit only supports 10-38
# Homekit only supports 10-38, overwriting
# the max to appears to work, but less than 10 causes
# a crash on the home app
hc_min_temp = max(min_temp, HC_MIN_TEMP)
hc_max_temp = min(max_temp, HC_MAX_TEMP)
hc_max_temp = max_temp
min_humidity = self.hass.states.get(self.entity_id).attributes.get(
ATTR_MIN_HUMIDITY, DEFAULT_MIN_HUMIDITY