parent
8c3014169f
commit
dcf3bae500
1 changed files with 17 additions and 3 deletions
|
@ -207,10 +207,9 @@ class ControllerDevice(ClimateEntity):
|
|||
"""Handle controller data updates."""
|
||||
if ctrl is not self._controller:
|
||||
return
|
||||
if not self.available:
|
||||
return
|
||||
self.async_write_ha_state()
|
||||
for zone in self.zones.values():
|
||||
if zone.hass is not None:
|
||||
zone.async_schedule_update_ha_state()
|
||||
|
||||
self.async_on_remove(
|
||||
async_dispatcher_connect(
|
||||
|
@ -492,6 +491,21 @@ class ZoneDevice(ClimateEntity):
|
|||
async def async_added_to_hass(self):
|
||||
"""Call on adding to hass."""
|
||||
|
||||
@callback
|
||||
def controller_update(ctrl: Controller) -> None:
|
||||
"""Handle controller data updates."""
|
||||
if ctrl.device_uid != self._controller.unique_id:
|
||||
return
|
||||
if not self.available:
|
||||
return
|
||||
self.async_write_ha_state()
|
||||
|
||||
self.async_on_remove(
|
||||
async_dispatcher_connect(
|
||||
self.hass, DISPATCH_CONTROLLER_UPDATE, controller_update
|
||||
)
|
||||
)
|
||||
|
||||
@callback
|
||||
def zone_update(ctrl: Controller, zone: Zone) -> None:
|
||||
"""Handle zone data updates."""
|
||||
|
|
Loading…
Add table
Reference in a new issue