Skip to content

Commit

Permalink
Fix lamp time sensor becoming unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
rrooggiieerr committed Dec 24, 2022
1 parent cd96f3c commit e0ff309
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/benqprojector/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ def _handle_coordinator_update(self) -> None:
if self._attr_native_value != new_state:
self._attr_native_value = self.coordinator.data[self.command]
updated = True

if self._attr_available is not True:
self._attr_available = True
updated = True
except ValueError as ex:
_LOGGER.error(ex)
if self._attr_available is not False:
Expand Down

0 comments on commit e0ff309

Please sign in to comment.