mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
parent
8c3014169f
commit
dcf3bae500
@ -207,10 +207,9 @@ class ControllerDevice(ClimateEntity):
|
|||||||
"""Handle controller data updates."""
|
"""Handle controller data updates."""
|
||||||
if ctrl is not self._controller:
|
if ctrl is not self._controller:
|
||||||
return
|
return
|
||||||
|
if not self.available:
|
||||||
|
return
|
||||||
self.async_write_ha_state()
|
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(
|
self.async_on_remove(
|
||||||
async_dispatcher_connect(
|
async_dispatcher_connect(
|
||||||
@ -492,6 +491,21 @@ class ZoneDevice(ClimateEntity):
|
|||||||
async def async_added_to_hass(self):
|
async def async_added_to_hass(self):
|
||||||
"""Call on adding to hass."""
|
"""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
|
@callback
|
||||||
def zone_update(ctrl: Controller, zone: Zone) -> None:
|
def zone_update(ctrl: Controller, zone: Zone) -> None:
|
||||||
"""Handle zone data updates."""
|
"""Handle zone data updates."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user