Allow use of common entity update service in AirVisual (#35203)

pull/35217/head
Aaron Bach 2020-05-04 15:09:09 -06:00 committed by GitHub
parent d8ebdda714
commit 953228ebd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -331,6 +331,13 @@ class AirVisualEntity(Entity):
self.update_from_latest_data()
async def async_update(self):
"""Update the entity.
Only used by the generic entity update service.
"""
await self.coordinator.async_request_refresh()
@callback
def update_from_latest_data(self):
"""Update the entity from the latest data."""