Update the update coordinator API to make it easier to use (#31471)

* Update the update coordinator API to make it easier to use

* failed_last_update -> last_update_success
This commit is contained in:
Paulus Schoutsen 2020-02-06 09:29:29 -08:00 committed by GitHub
parent d407b8e215
commit 0d474e1183
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 69 additions and 41 deletions

View file

@ -38,7 +38,7 @@ class UpdaterBinary(BinarySensorDevice):
@property
def available(self) -> bool:
"""Return True if entity is available."""
return not self.coordinator.failed_last_update
return self.coordinator.last_update_success
@property
def should_poll(self) -> bool: