1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00

Raise ConfigEntryNotReady for Neato API error (#54227)

This commit is contained in:
Simone Chemelli 2021-08-07 19:15:25 +02:00 committed by GitHub
parent ca2bdfab6b
commit 819131ad21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,6 +77,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
_LOGGER.debug("API error: %s (%s)", ex.code, ex.message)
if ex.code in (401, 403):
raise ConfigEntryAuthFailed("Token not valid, trigger renewal") from ex
raise ConfigEntryNotReady from ex
neato_session = api.ConfigEntryAuth(hass, entry, implementation)
hass.data[NEATO_DOMAIN][entry.entry_id] = neato_session