Explicitly pass in the config_entry in stookwijzer coordinator (#137928)

explicitly pass in the config_entry in coordinator
This commit is contained in:
Michael 2025-02-08 21:36:59 +01:00 committed by GitHub
parent 071b46055b
commit 13dbeed5c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,18 +20,23 @@ type StookwijzerConfigEntry = ConfigEntry[StookwijzerCoordinator]
class StookwijzerCoordinator(DataUpdateCoordinator[None]):
"""Stookwijzer update coordinator."""
def __init__(self, hass: HomeAssistant, entry: StookwijzerConfigEntry) -> None:
config_entry: StookwijzerConfigEntry
def __init__(
self, hass: HomeAssistant, config_entry: StookwijzerConfigEntry
) -> None:
"""Initialize the coordinator."""
super().__init__(
hass,
LOGGER,
config_entry=config_entry,
name=DOMAIN,
update_interval=SCAN_INTERVAL,
)
self.client = Stookwijzer(
async_get_clientsession(hass),
entry.data[CONF_LATITUDE],
entry.data[CONF_LONGITUDE],
config_entry.data[CONF_LATITUDE],
config_entry.data[CONF_LONGITUDE],
)
async def _async_update_data(self) -> None: