From 1857d823e6fb68f825b73a65f39c25b169d6827e Mon Sep 17 00:00:00 2001 From: Vova-SH <60854798+Vova-SH@users.noreply.github.com> Date: Thu, 16 Jun 2022 19:42:56 +0700 Subject: [PATCH] Fix sample update data coordinator (#1369) Co-authored-by: Martin Hjelmare --- docs/integration_fetching_data.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/integration_fetching_data.md b/docs/integration_fetching_data.md index 05d540d4..5f379c5a 100644 --- a/docs/integration_fetching_data.md +++ b/docs/integration_fetching_data.md @@ -36,6 +36,7 @@ import logging import async_timeout from homeassistant.components.light import LightEntity +from homeassistant.core import callback from homeassistant.exceptions import ConfigEntryAuthFailed from homeassistant.helpers.update_coordinator import ( CoordinatorEntity, @@ -84,7 +85,7 @@ class MyCoordinator(DataUpdateCoordinator): ) self.my_api = my_api - async def _async_update_data(): + async def _async_update_data(self): """Fetch data from API endpoint. This is the place to pre-process the data to lookup tables