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>
pull/81105/head
ztamas83 2022-11-08 16:09:58 +01:00 committed by GitHub
parent 45be2a260e
commit 5040b94330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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: