Skip to content

Commit

Permalink
Adjust API object handling
Browse files Browse the repository at this point in the history
  • Loading branch information
andarotajo committed Apr 12, 2024
1 parent 345ee77 commit df914c2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions homeassistant/components/dwd_weather_warnings/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ class DwdWeatherWarningsCoordinator(DataUpdateCoordinator[None]):
"""Custom coordinator for the dwd_weather_warnings integration."""

config_entry: ConfigEntry
_api: DwdWeatherWarningsAPI

def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
"""Initialize the dwd_weather_warnings coordinator."""
super().__init__(
hass, LOGGER, name=DOMAIN, update_interval=DEFAULT_SCAN_INTERVAL
)

self._api = DwdWeatherWarningsAPI(None)
self._device_tracker = None

async def async_config_entry_first_refresh(self) -> None:
Expand Down Expand Up @@ -58,7 +58,4 @@ async def _async_update_data(self) -> None:
DwdWeatherWarningsAPI, position
)
else:
if self._api is None:
raise UpdateFailed("API is not initialized")

await self.hass.async_add_executor_job(self._api.update)

0 comments on commit df914c2

Please sign in to comment.