Skip to content

Commit

Permalink
Set device to unavailable if its not provided anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre0512 committed Oct 18, 2023
1 parent b5d7bba commit c962a00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/speedport/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,7 @@ def _handle_coordinator_update(self) -> None:
"""Handle updated data from the coordinator."""
self._device = self.coordinator.data.get(self._mac)
self.async_write_ha_state()

@property
def available(self) -> bool:
return super().available and self._device is not None

0 comments on commit c962a00

Please sign in to comment.