mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Explicitly pass in the config_entry in dwd weather warnings coordinator (#137737)
This commit is contained in:
parent
e9bfb6baee
commit
61d1b34cef
@ -16,7 +16,7 @@ async def async_setup_entry(
|
||||
device_registry = dr.async_get(hass)
|
||||
if device_registry.async_get_device(identifiers={(DOMAIN, entry.entry_id)}):
|
||||
device_registry.async_clear_config_entry(entry.entry_id)
|
||||
coordinator = DwdWeatherWarningsCoordinator(hass)
|
||||
coordinator = DwdWeatherWarningsCoordinator(hass, entry)
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
|
||||
entry.runtime_data = coordinator
|
||||
|
@ -28,10 +28,16 @@ class DwdWeatherWarningsCoordinator(DataUpdateCoordinator[None]):
|
||||
config_entry: DwdWeatherWarningsConfigEntry
|
||||
api: DwdWeatherWarningsAPI
|
||||
|
||||
def __init__(self, hass: HomeAssistant) -> None:
|
||||
def __init__(
|
||||
self, hass: HomeAssistant, config_entry: DwdWeatherWarningsConfigEntry
|
||||
) -> None:
|
||||
"""Initialize the dwd_weather_warnings coordinator."""
|
||||
super().__init__(
|
||||
hass, LOGGER, name=DOMAIN, update_interval=DEFAULT_SCAN_INTERVAL
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=DOMAIN,
|
||||
update_interval=DEFAULT_SCAN_INTERVAL,
|
||||
)
|
||||
|
||||
self._device_tracker = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user