diff --git a/homeassistant/components/hunterdouglas_powerview/__init__.py b/homeassistant/components/hunterdouglas_powerview/__init__.py index a8461f4da5c..a9c620a4baa 100644 --- a/homeassistant/components/hunterdouglas_powerview/__init__.py +++ b/homeassistant/components/hunterdouglas_powerview/__init__.py @@ -89,12 +89,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: (await shades.get_resources())[SHADE_DATA] ) except HUB_EXCEPTIONS as err: - _LOGGER.error("Connection error to PowerView hub: %s", hub_address) - raise ConfigEntryNotReady from err - + raise ConfigEntryNotReady( + f"Connection error to PowerView hub: {hub_address}: {err}" + ) from err if not device_info: - _LOGGER.error("Unable to initialize PowerView hub: %s", hub_address) - raise ConfigEntryNotReady + raise ConfigEntryNotReady(f"Unable to initialize PowerView hub: {hub_address}") async def async_update_data(): """Fetch data from shade endpoint.""" diff --git a/homeassistant/components/hunterdouglas_powerview/const.py b/homeassistant/components/hunterdouglas_powerview/const.py index e827b055995..ea87150a9ca 100644 --- a/homeassistant/components/hunterdouglas_powerview/const.py +++ b/homeassistant/components/hunterdouglas_powerview/const.py @@ -3,7 +3,7 @@ import asyncio from aiohttp.client_exceptions import ServerDisconnectedError -from aiopvapi.helpers.aiorequest import PvApiConnectionError +from aiopvapi.helpers.aiorequest import PvApiConnectionError, PvApiResponseStatusError DOMAIN = "hunterdouglas_powerview" @@ -62,7 +62,12 @@ PV_SHADE_DATA = "pv_shade_data" PV_ROOM_DATA = "pv_room_data" COORDINATOR = "coordinator" -HUB_EXCEPTIONS = (ServerDisconnectedError, asyncio.TimeoutError, PvApiConnectionError) +HUB_EXCEPTIONS = ( + ServerDisconnectedError, + asyncio.TimeoutError, + PvApiConnectionError, + PvApiResponseStatusError, +) LEGACY_DEVICE_SUB_REVISION = 1 LEGACY_DEVICE_REVISION = 0