Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak device on_network property handling for the active coordinator #22

Merged
merged 1 commit into from
Mar 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading