Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions custom_components/hive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from apyhiveapi import Auth, Hive
from apyhiveapi.helper.hive_exceptions import (
HiveConnectionError,
HiveInvalidDeviceAuthentication,
HiveReauthRequired,
HiveUnknownConfiguration,
)
Expand Down Expand Up @@ -50,8 +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:
raise ConfigEntryAuthFailed from err
except (
HiveReauthRequired,
HiveUnknownConfiguration,
HiveInvalidDeviceAuthentication,
) as err:

device_registry = dr.async_get(hass)
device_registry.async_get_or_create(
Expand Down