From 953228ebd2414970a9a313f709b85e4cf35f0d68 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Mon, 4 May 2020 15:09:09 -0600 Subject: [PATCH] Allow use of common entity update service in AirVisual (#35203) --- homeassistant/components/airvisual/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/homeassistant/components/airvisual/__init__.py b/homeassistant/components/airvisual/__init__.py index 099fdfc5df7..4c46e7b3e7d 100644 --- a/homeassistant/components/airvisual/__init__.py +++ b/homeassistant/components/airvisual/__init__.py @@ -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."""