From 5040b943305e4cdb2fb0afec7df7bf607ce44aa2 Mon Sep 17 00:00:00 2001 From: ztamas83 <71548739+ztamas83@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:09:58 +0100 Subject: [PATCH] Retry tibber setup (#81785) * Handle integration setup retries * Fix black error * Update to falsy check Co-authored-by: Martin Hjelmare * Remove duplicated log * Update exception message Co-authored-by: Martin Hjelmare Co-authored-by: Martin Hjelmare --- homeassistant/components/tibber/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/tibber/__init__.py b/homeassistant/components/tibber/__init__.py index 35507986f90..4d9c0560682 100644 --- a/homeassistant/components/tibber/__init__.py +++ b/homeassistant/components/tibber/__init__.py @@ -53,6 +53,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: try: await tibber_connection.update_info() + if not tibber_connection.name: + raise ConfigEntryNotReady("Could not fetch Tibber data.") + except asyncio.TimeoutError as err: raise ConfigEntryNotReady from err except aiohttp.ClientError as err: