Set entities as unavailable if last update was not successful (#54229)

pull/54244/head^2
Joakim Sørensen 2021-08-07 20:22:19 +02:00 committed by GitHub
parent 3b1d44478a
commit a485b14293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -75,4 +75,6 @@ class UptimeRobotEntity(CoordinatorEntity):
@property
def available(self) -> bool:
"""Returtn if entity is available."""
if not self.coordinator.last_update_success:
return False
return self.monitor is not None