Fix HomeKit thermostat to take priority over fans (#81473)

This commit is contained in:
J. Nick Koston 2022-11-03 14:49:12 +01:00 committed by GitHub
parent bad33da2c1
commit cd5901e0d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -306,7 +306,7 @@ class Thermostat(HomeAccessory):
if attributes.get(ATTR_HVAC_ACTION) is not None:
self.fan_chars.append(CHAR_CURRENT_FAN_STATE)
serv_fan = self.add_preload_service(SERV_FANV2, self.fan_chars)
serv_thermostat.add_linked_service(serv_fan)
serv_fan.add_linked_service(serv_thermostat)
self.char_active = serv_fan.configure_char(
CHAR_ACTIVE, value=1, setter_callback=self._set_fan_active
)