diff --git a/homeassistant/components/youtube/__init__.py b/homeassistant/components/youtube/__init__.py index aee4b83508c..ec8a3f325cb 100644 --- a/homeassistant/components/youtube/__init__.py +++ b/homeassistant/components/youtube/__init__.py @@ -36,7 +36,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: raise ConfigEntryNotReady from err except ClientError as err: raise ConfigEntryNotReady from err - coordinator = YouTubeDataUpdateCoordinator(hass, auth) + coordinator = YouTubeDataUpdateCoordinator(hass, entry, auth) await coordinator.async_config_entry_first_refresh() diff --git a/homeassistant/components/youtube/coordinator.py b/homeassistant/components/youtube/coordinator.py index 0da480f1169..476e5bb4022 100644 --- a/homeassistant/components/youtube/coordinator.py +++ b/homeassistant/components/youtube/coordinator.py @@ -35,12 +35,15 @@ class YouTubeDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]): 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.""" self._auth = auth super().__init__( hass, LOGGER, + config_entry=config_entry, name=DOMAIN, update_interval=timedelta(minutes=15), )