1 """JustNimbus coordinator."""
3 from __future__
import annotations
5 from datetime
import timedelta
15 from .const
import CONF_ZIP_CODE, DOMAIN
17 _LOGGER = logging.getLogger(__name__)
21 """Data update coordinator."""
23 def __init__(self, hass: HomeAssistant, entry: ConfigEntry) ->
None:
24 """Initialize the coordinator."""
31 self.
_client_client = justnimbus.JustNimbusClient(
32 client_id=entry.data[CONF_CLIENT_ID], zip_code=entry.data[CONF_ZIP_CODE]
36 """Fetch the latest data from the source."""
37 return await self.
hasshass.async_add_executor_job(self.
_client_client.get_data)
None __init__(self, HomeAssistant hass, ConfigEntry entry)
justnimbus.JustNimbusModel _async_update_data(self)