From 75e59167de316a1a6975cc3489355b1c6c0658dd Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Mon, 26 Feb 2024 20:41:20 +0100 Subject: [PATCH] Reolink trigger ReAuth when credentials invalid during update (#111492) Check for CredentialsInvalidError --- homeassistant/components/reolink/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/reolink/__init__.py b/homeassistant/components/reolink/__init__.py index bb8c9427a9c..3196dbf3ad7 100644 --- a/homeassistant/components/reolink/__init__.py +++ b/homeassistant/components/reolink/__init__.py @@ -84,6 +84,8 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b async with asyncio.timeout(host.api.timeout * (RETRY_ATTEMPTS + 2)): try: await host.update_states() + except CredentialsInvalidError as err: + raise ConfigEntryAuthFailed(err) from err except ReolinkError as err: raise UpdateFailed(str(err)) from err