Skip to content

Commit

Permalink
Tweak device on_network property handling for the active coordinator (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulcahey authored Mar 31, 2024
1 parent 6f0d07f commit b674d21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zha/zigbee/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def device_automation_triggers(self) -> dict[tuple[str, str], dict[str, str]]:
@property
def available(self):
"""Return True if device is available."""
return self._available and self._on_network
return self._available and self.on_network

@available.setter
def available(self, new_availability: bool) -> None:
Expand All @@ -411,7 +411,7 @@ def available(self, new_availability: bool) -> None:
@property
def on_network(self):
"""Return True if device is currently on the network."""
return self._on_network
return self.is_active_coordinator or self._on_network

@on_network.setter
def on_network(self, new_on_network: bool) -> None:
Expand Down

0 comments on commit b674d21

Please sign in to comment.