Update IZone to new version of library (#60676)

This commit is contained in:
Penny Wood 2021-12-01 14:41:52 +08:00 committed by GitHub
parent 3770a72601
commit 44714081d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 5 deletions

View file

@ -209,7 +209,8 @@ class ControllerDevice(ClimateEntity):
return
self.async_write_ha_state()
for zone in self.zones.values():
zone.async_schedule_update_ha_state()
if zone.hass is not None:
zone.async_schedule_update_ha_state()
self.async_on_remove(
async_dispatcher_connect(
@ -244,7 +245,8 @@ class ControllerDevice(ClimateEntity):
self._available = available
self.async_write_ha_state()
for zone in self.zones.values():
zone.async_schedule_update_ha_state()
if zone.hass is not None:
zone.async_schedule_update_ha_state()
@property
def unique_id(self):
@ -495,6 +497,8 @@ class ZoneDevice(ClimateEntity):
"""Handle zone data updates."""
if zone is not self._zone:
return
if not self.available:
return
self._name = zone.name.title()
self.async_write_ha_state()