mirror of
https://github.com/home-assistant/core.git
synced 2025-08-15 02:21:40 +02:00
Explicitly pass in the config_entry in stookwijzer coordinator (#137928)
explicitly pass in the config_entry in coordinator
This commit is contained in:
@@ -20,18 +20,23 @@ type StookwijzerConfigEntry = ConfigEntry[StookwijzerCoordinator]
|
|||||||
class StookwijzerCoordinator(DataUpdateCoordinator[None]):
|
class StookwijzerCoordinator(DataUpdateCoordinator[None]):
|
||||||
"""Stookwijzer update coordinator."""
|
"""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."""
|
"""Initialize the coordinator."""
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
LOGGER,
|
LOGGER,
|
||||||
|
config_entry=config_entry,
|
||||||
name=DOMAIN,
|
name=DOMAIN,
|
||||||
update_interval=SCAN_INTERVAL,
|
update_interval=SCAN_INTERVAL,
|
||||||
)
|
)
|
||||||
self.client = Stookwijzer(
|
self.client = Stookwijzer(
|
||||||
async_get_clientsession(hass),
|
async_get_clientsession(hass),
|
||||||
entry.data[CONF_LATITUDE],
|
config_entry.data[CONF_LATITUDE],
|
||||||
entry.data[CONF_LONGITUDE],
|
config_entry.data[CONF_LONGITUDE],
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _async_update_data(self) -> None:
|
async def _async_update_data(self) -> None:
|
||||||
|
Reference in New Issue
Block a user