mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 18:57:57 +00:00
Explicitly pass in the config_entry in AVM Fritz!SmartHome coordinator init (#136769)
This commit is contained in:
parent
032e17720c
commit
f98dc160f3
@ -37,7 +37,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: FritzboxConfigEntry) ->
|
|||||||
|
|
||||||
await async_migrate_entries(hass, entry.entry_id, _update_unique_id)
|
await async_migrate_entries(hass, entry.entry_id, _update_unique_id)
|
||||||
|
|
||||||
coordinator = FritzboxDataUpdateCoordinator(hass, entry.entry_id)
|
coordinator = FritzboxDataUpdateCoordinator(hass, entry)
|
||||||
await coordinator.async_setup()
|
await coordinator.async_setup()
|
||||||
|
|
||||||
entry.runtime_data = coordinator
|
entry.runtime_data = coordinator
|
||||||
|
@ -38,12 +38,13 @@ class FritzboxDataUpdateCoordinator(DataUpdateCoordinator[FritzboxCoordinatorDat
|
|||||||
fritz: Fritzhome
|
fritz: Fritzhome
|
||||||
has_templates: bool
|
has_templates: bool
|
||||||
|
|
||||||
def __init__(self, hass: HomeAssistant, name: str) -> None:
|
def __init__(self, hass: HomeAssistant, config_entry: FritzboxConfigEntry) -> None:
|
||||||
"""Initialize the Fritzbox Smarthome device coordinator."""
|
"""Initialize the Fritzbox Smarthome device coordinator."""
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
LOGGER,
|
LOGGER,
|
||||||
name=name,
|
config_entry=config_entry,
|
||||||
|
name=config_entry.entry_id,
|
||||||
update_interval=timedelta(seconds=30),
|
update_interval=timedelta(seconds=30),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user