Explicitly pass in the config_entry in seventeentrack coordinator (#137956)

explicitly pass in the config_entry in coordinator
This commit is contained in:
Michael 2025-02-08 21:40:51 +01:00 committed by GitHub
parent b512838d1e
commit a59d829e6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -39,7 +39,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
except SeventeenTrackError as err:
raise ConfigEntryNotReady from err
seventeen_coordinator = SeventeenTrackCoordinator(hass, client)
seventeen_coordinator = SeventeenTrackCoordinator(hass, entry, client)
await seventeen_coordinator.async_config_entry_first_refresh()

View File

@ -34,11 +34,17 @@ class SeventeenTrackCoordinator(DataUpdateCoordinator[SeventeenTrackData]):
config_entry: ConfigEntry
def __init__(self, hass: HomeAssistant, client: SeventeenTrackClient) -> None:
def __init__(
self,
hass: HomeAssistant,
config_entry: ConfigEntry,
client: SeventeenTrackClient,
) -> None:
"""Initialize."""
super().__init__(
hass,
LOGGER,
config_entry=config_entry,
name=DOMAIN,
update_interval=DEFAULT_SCAN_INTERVAL,
)