mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Explicitly pass in the config_entry in youtube coordinator (#137859)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
367dafdfe7
commit
d07c2b8226
@ -36,7 +36,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
raise ConfigEntryNotReady from err
|
raise ConfigEntryNotReady from err
|
||||||
except ClientError as err:
|
except ClientError as err:
|
||||||
raise ConfigEntryNotReady from err
|
raise ConfigEntryNotReady from err
|
||||||
coordinator = YouTubeDataUpdateCoordinator(hass, auth)
|
coordinator = YouTubeDataUpdateCoordinator(hass, entry, auth)
|
||||||
|
|
||||||
await coordinator.async_config_entry_first_refresh()
|
await coordinator.async_config_entry_first_refresh()
|
||||||
|
|
||||||
|
@ -35,12 +35,15 @@ class YouTubeDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
|
|||||||
|
|
||||||
config_entry: ConfigEntry
|
config_entry: ConfigEntry
|
||||||
|
|
||||||
def __init__(self, hass: HomeAssistant, auth: AsyncConfigEntryAuth) -> None:
|
def __init__(
|
||||||
|
self, hass: HomeAssistant, config_entry: ConfigEntry, auth: AsyncConfigEntryAuth
|
||||||
|
) -> None:
|
||||||
"""Initialize the YouTube data coordinator."""
|
"""Initialize the YouTube data coordinator."""
|
||||||
self._auth = auth
|
self._auth = auth
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
LOGGER,
|
LOGGER,
|
||||||
|
config_entry=config_entry,
|
||||||
name=DOMAIN,
|
name=DOMAIN,
|
||||||
update_interval=timedelta(minutes=15),
|
update_interval=timedelta(minutes=15),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user