mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Use coordinator async_setup in dwd weather (#129448)
This commit is contained in:
parent
409c8783fe
commit
35a9d502af
@ -37,8 +37,8 @@ class DwdWeatherWarningsCoordinator(DataUpdateCoordinator[None]):
|
||||
self._device_tracker = None
|
||||
self._previous_position = None
|
||||
|
||||
async def async_config_entry_first_refresh(self) -> None:
|
||||
"""Perform first refresh."""
|
||||
async def _async_setup(self) -> None:
|
||||
"""Set up coordinator."""
|
||||
if region_identifier := self.config_entry.data.get(CONF_REGION_IDENTIFIER):
|
||||
self.api = await self.hass.async_add_executor_job(
|
||||
DwdWeatherWarningsAPI, region_identifier
|
||||
@ -48,8 +48,6 @@ class DwdWeatherWarningsCoordinator(DataUpdateCoordinator[None]):
|
||||
CONF_REGION_DEVICE_TRACKER
|
||||
)
|
||||
|
||||
await super().async_config_entry_first_refresh()
|
||||
|
||||
async def _async_update_data(self) -> None:
|
||||
"""Get the latest data from the DWD Weather Warnings API."""
|
||||
if self._device_tracker:
|
||||
|
Loading…
x
Reference in New Issue
Block a user