mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Explicitly pass in the config_entry in goalzero coordinator (#137836)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
39d6aaf294
commit
9bdd8d04c5
@ -36,7 +36,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: GoalZeroConfigEntry) ->
|
||||
except exceptions.ConnectError as ex:
|
||||
raise ConfigEntryNotReady(f"Failed to connect to device: {ex}") from ex
|
||||
|
||||
entry.runtime_data = GoalZeroDataUpdateCoordinator(hass, api)
|
||||
entry.runtime_data = GoalZeroDataUpdateCoordinator(hass, entry, api)
|
||||
await entry.runtime_data.async_config_entry_first_refresh()
|
||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||
|
||||
|
@ -18,11 +18,14 @@ class GoalZeroDataUpdateCoordinator(DataUpdateCoordinator[None]):
|
||||
|
||||
config_entry: GoalZeroConfigEntry
|
||||
|
||||
def __init__(self, hass: HomeAssistant, api: Yeti) -> None:
|
||||
def __init__(
|
||||
self, hass: HomeAssistant, config_entry: GoalZeroConfigEntry, api: Yeti
|
||||
) -> None:
|
||||
"""Initialize the coordinator."""
|
||||
super().__init__(
|
||||
hass=hass,
|
||||
logger=LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=DOMAIN,
|
||||
update_interval=timedelta(seconds=30),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user