Skip to content

Commit 9a857e8

Browse files
committed
update availability
1 parent fcdaf12 commit 9a857e8

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

zha/application/gateway.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,7 @@ def async_update_device(
619619
device = self.devices[sender.ieee]
620620
# avoid a race condition during new joins
621621
if device.status is DeviceStatus.INITIALIZED:
622-
device.update_available(
623-
available=available, on_network=device.on_network
624-
)
622+
device.update_available(available=available, on_network=available)
625623

626624
async def async_device_initialized(self, device: zigpy.device.Device) -> None:
627625
"""Handle device joined and basic information discovered (async)."""

zha/zigbee/device.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ async def _check_available(self, *_: Any) -> None:
618618
),
619619
difference,
620620
)
621-
self.update_available(available=False, on_network=self.on_network)
621+
self.update_available(available=False, on_network=False)
622622
return
623623

624624
self._checkins_missed_count += 1
@@ -628,7 +628,7 @@ async def _check_available(self, *_: Any) -> None:
628628
)
629629
if not self._basic_ch:
630630
self.debug("does not have a mandatory basic cluster")
631-
self.update_available(available=False, on_network=self.on_network)
631+
self.update_available(available=False, on_network=False)
632632
return
633633
res = await self._basic_ch.get_attribute_value(
634634
ATTR_MANUFACTURER, from_cache=False

0 commit comments

Comments
 (0)