Bump reolink-aio to 0.2.2 (#85848)

This commit is contained in:
starkillerOG 2023-01-14 02:25:22 +01:00 committed by GitHub
parent bca462401c
commit 5f67e79ad9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 18 deletions

View file

@ -5,7 +5,7 @@ from collections.abc import Mapping
import logging
from typing import Any
from reolink_aio.exceptions import ApiError, CredentialsInvalidError
from reolink_aio.exceptions import ApiError, CredentialsInvalidError, ReolinkError
import voluptuous as vol
from homeassistant import config_entries, exceptions
@ -108,6 +108,9 @@ class ReolinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
except ApiError as err:
placeholders["error"] = str(err)
errors[CONF_HOST] = "api_error"
except ReolinkError as err:
placeholders["error"] = str(err)
errors[CONF_HOST] = "cannot_connect"
except Exception as err: # pylint: disable=broad-except
_LOGGER.exception("Unexpected exception")
placeholders["error"] = str(err)