Add bed sensor availability for withings (#37906)

This commit is contained in:
Robert Van Gorkom 2020-08-02 07:36:14 -07:00 committed by GitHub
parent a57dca1e11
commit c913d17913
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -926,6 +926,12 @@ class BaseWithingsSensor(Entity):
if self._attribute.update_type == UpdateType.POLL:
return self._data_manager.poll_data_update_coordinator.last_update_success
if self._attribute.update_type == UpdateType.WEBHOOK:
return self._data_manager.webhook_config.enabled and (
self._attribute.measurement
in self._data_manager.webhook_update_coordinator.data
)
return True
@property