From 9e091f7a73ff1a20bf2de17ed9cfed0eed869e49 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Sat, 8 Feb 2025 15:34:53 +0100 Subject: [PATCH] Explicitly pass in the config_entry in google coordinator (#137839) explicitly pass in the config_entry in coordinator --- homeassistant/components/google/calendar.py | 2 ++ homeassistant/components/google/coordinator.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/homeassistant/components/google/calendar.py b/homeassistant/components/google/calendar.py index 5ac5dae616c..82208420b8c 100644 --- a/homeassistant/components/google/calendar.py +++ b/homeassistant/components/google/calendar.py @@ -266,6 +266,7 @@ async def async_setup_entry( if not entity_description.local_sync: coordinator = CalendarQueryUpdateCoordinator( hass, + config_entry, calendar_service, entity_description.name or entity_description.key, calendar_id, @@ -285,6 +286,7 @@ async def async_setup_entry( ) coordinator = CalendarSyncUpdateCoordinator( hass, + config_entry, sync, entity_description.name or entity_description.key, ) diff --git a/homeassistant/components/google/coordinator.py b/homeassistant/components/google/coordinator.py index 19198041c05..4a8a3d9f167 100644 --- a/homeassistant/components/google/coordinator.py +++ b/homeassistant/components/google/coordinator.py @@ -52,6 +52,7 @@ class CalendarSyncUpdateCoordinator(DataUpdateCoordinator[Timeline]): def __init__( self, hass: HomeAssistant, + config_entry: ConfigEntry, sync: CalendarEventSyncManager, name: str, ) -> None: @@ -59,6 +60,7 @@ class CalendarSyncUpdateCoordinator(DataUpdateCoordinator[Timeline]): super().__init__( hass, _LOGGER, + config_entry=config_entry, name=name, update_interval=MIN_TIME_BETWEEN_UPDATES, ) @@ -111,6 +113,7 @@ class CalendarQueryUpdateCoordinator(DataUpdateCoordinator[list[Event]]): def __init__( self, hass: HomeAssistant, + config_entry: ConfigEntry, calendar_service: GoogleCalendarService, name: str, calendar_id: str, @@ -120,6 +123,7 @@ class CalendarQueryUpdateCoordinator(DataUpdateCoordinator[list[Event]]): super().__init__( hass, _LOGGER, + config_entry=config_entry, name=name, update_interval=MIN_TIME_BETWEEN_UPDATES, )