mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Retry tibber setup (#81785)
* Handle integration setup retries * Fix black error * Update to falsy check Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Remove duplicated log * Update exception message Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
59ec829106
commit
7ab2029071
@ -53,6 +53,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
await tibber_connection.update_info()
|
await tibber_connection.update_info()
|
||||||
|
if not tibber_connection.name:
|
||||||
|
raise ConfigEntryNotReady("Could not fetch Tibber data.")
|
||||||
|
|
||||||
except asyncio.TimeoutError as err:
|
except asyncio.TimeoutError as err:
|
||||||
raise ConfigEntryNotReady from err
|
raise ConfigEntryNotReady from err
|
||||||
except aiohttp.ClientError as err:
|
except aiohttp.ClientError as err:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user