1 """Data coordinator for WeatherFlow Cloud Data."""
3 from datetime
import timedelta
5 from aiohttp
import ClientResponseError
6 from weatherflow4py.api
import WeatherFlowRestAPI
7 from weatherflow4py.models.rest.unified
import WeatherFlowDataREST
13 from .const
import DOMAIN, LOGGER
17 DataUpdateCoordinator[dict[int, WeatherFlowDataREST]]
19 """Class to manage fetching REST Based WeatherFlow Forecast data."""
21 def __init__(self, hass: HomeAssistant, api_token: str) ->
None:
22 """Initialize global WeatherFlow forecast data updater."""
23 self.
weather_apiweather_api = WeatherFlowRestAPI(api_token=api_token)
32 """Fetch data from WeatherFlow Forecast."""
35 return await self.
weather_apiweather_api.get_all_data()
36 except ClientResponseError
as err:
None __init__(self, HomeAssistant hass, str api_token)
dict[int, WeatherFlowDataREST] _async_update_data(self)