From 7d2e931446741e07dffb55a2d68e1f7e6b45b438 Mon Sep 17 00:00:00 2001 From: bigshow104 <82096625+bigshow104@users.noreply.github.com> Date: Sun, 8 Nov 2026 12:24:47 +0000 Subject: [PATCH] Fix Hive reauthentication on invalid device authentication --- custom_components/hive/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/custom_components/hive/__init__.py b/custom_components/hive/__init__.py index 071b7c7..771d52a 100755 --- a/custom_components/hive/__init__.py +++ b/custom_components/hive/__init__.py @@ -11,6 +11,7 @@ from apyhiveapi import Auth, Hive from apyhiveapi.helper.hive_exceptions import ( HiveConnectionError, + HiveInvalidDeviceAuthentication, HiveReauthRequired, HiveUnknownConfiguration, ) @@ -50,7 +51,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: HiveConfigEntry) -> bool except HiveConnectionError as error: _LOGGER.error("Could not fetch devices from Hive: %s", error) raise ConfigEntryNotReady from error - except (HiveReauthRequired, HiveUnknownConfiguration) as err: + except ( + HiveReauthRequired, + HiveUnknownConfiguration, + HiveInvalidDeviceAuthentication, + ) as err: raise ConfigEntryAuthFailed from err device_registry = dr.async_get(hass)