Raise exception when data can't be fetched in Opensky (#103596)

This commit is contained in:
Joost Lekkerkerker 2023-11-07 16:33:46 +01:00 committed by Franck Nijhof
parent f9c70fd3c8
commit d1a3a5895b
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -3,7 +3,7 @@ from __future__ import annotations
from aiohttp import BasicAuth
from python_opensky import OpenSky
from python_opensky.exceptions import OpenSkyUnauthenticatedError
from python_opensky.exceptions import OpenSkyError
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
@ -28,7 +28,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
),
contributing_user=entry.options.get(CONF_CONTRIBUTING_USER, False),
)
except OpenSkyUnauthenticatedError as exc:
except OpenSkyError as exc:
raise ConfigEntryNotReady from exc
coordinator = OpenSkyDataUpdateCoordinator(hass, client)