1 """Data update coordinator for the Goal zero integration."""
3 from datetime
import timedelta
5 from goalzero
import Yeti, exceptions
11 from .const
import DOMAIN, LOGGER
13 type GoalZeroConfigEntry = ConfigEntry[GoalZeroDataUpdateCoordinator]
17 """Data update coordinator for the Goal zero integration."""
19 config_entry: GoalZeroConfigEntry
21 def __init__(self, hass: HomeAssistant, api: Yeti) ->
None:
22 """Initialize the coordinator."""
32 """Fetch data from API endpoint."""
35 except exceptions.ConnectError
as err:
36 raise UpdateFailed(
"Failed to communicate with device")
from err
None __init__(self, HomeAssistant hass, Yeti api)
None _async_update_data(self)
str|float get_state(dict[str, float] data, str key)