Explicitly pass in the config_entry in analytics_insight coordinator init (#137706)

explicitly pass in the config_entry in analytics_insight coordinator init
This commit is contained in:
Michael 2025-02-07 23:38:52 +01:00 committed by GitHub
parent ee80966a10
commit 1d3cef5c6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -48,7 +48,7 @@ async def async_setup_entry(
continue
names[integration] = integrations[integration].title
coordinator = HomeassistantAnalyticsDataUpdateCoordinator(hass, client)
coordinator = HomeassistantAnalyticsDataUpdateCoordinator(hass, entry, client)
await coordinator.async_config_entry_first_refresh()

View File

@ -46,12 +46,16 @@ class HomeassistantAnalyticsDataUpdateCoordinator(DataUpdateCoordinator[Analytic
config_entry: AnalyticsInsightsConfigEntry
def __init__(
self, hass: HomeAssistant, client: HomeassistantAnalyticsClient
self,
hass: HomeAssistant,
config_entry: AnalyticsInsightsConfigEntry,
client: HomeassistantAnalyticsClient,
) -> None:
"""Initialize the Homeassistant Analytics data coordinator."""
super().__init__(
hass,
LOGGER,
config_entry=config_entry,
name=DOMAIN,
update_interval=timedelta(hours=12),
)