Ensure hue connection errors are passed to ConfigEntryNotReady (#49674)

- Limits log spam on retry
This commit is contained in:
J. Nick Koston 2021-04-25 16:42:45 -10:00 committed by GitHub
parent 5a993a3ff3
commit 9222d3e9f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,8 +90,9 @@ class HueBridge:
return False
except CannotConnect as err:
LOGGER.error("Error connecting to the Hue bridge at %s", host)
raise ConfigEntryNotReady from err
raise ConfigEntryNotReady(
f"Error connecting to the Hue bridge at {host}"
) from err
except Exception: # pylint: disable=broad-except
LOGGER.exception("Unknown error connecting with Hue bridge at %s", host)