mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Explicitly pass in the config_entry in weatherkit coordinator (#137869)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
b338de9a30
commit
a2a55d9ff0
@ -32,6 +32,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
hass.data.setdefault(DOMAIN, {})
|
||||
coordinator = WeatherKitDataUpdateCoordinator(
|
||||
hass=hass,
|
||||
config_entry=entry,
|
||||
client=WeatherKitApiClient(
|
||||
key_id=entry.data[CONF_KEY_ID],
|
||||
service_id=entry.data[CONF_SERVICE_ID],
|
||||
|
@ -33,6 +33,7 @@ class WeatherKitDataUpdateCoordinator(DataUpdateCoordinator):
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
client: WeatherKitApiClient,
|
||||
) -> None:
|
||||
"""Initialize."""
|
||||
@ -40,6 +41,7 @@ class WeatherKitDataUpdateCoordinator(DataUpdateCoordinator):
|
||||
super().__init__(
|
||||
hass=hass,
|
||||
logger=LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=DOMAIN,
|
||||
update_interval=timedelta(minutes=5),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user