Skip to content

Commit

Permalink
Mark invalid properties as not available
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsK1 authored Oct 7, 2024
1 parent ce48433 commit cad1b5e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/solvis_control/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def _handle_coordinator_update(self) -> None:

if self.coordinator.data is None:
_LOGGER.warning("Data from coordinator is None. Skipping update")
self._attr_available = False
return
if not isinstance(self.coordinator.data, dict):
_LOGGER.warning("Invalid data from coordinator")
Expand Down

0 comments on commit cad1b5e

Please sign in to comment.