mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Handle TimeoutError during HKC setup attempts (#80399)
closes https://github.com/Jc2k/aiohomekit/issues/188
This commit is contained in:
parent
29e110d416
commit
40600991b3
@ -40,7 +40,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
await conn.async_setup()
|
await conn.async_setup()
|
||||||
except (AccessoryNotFoundError, EncryptionError, AccessoryDisconnectedError) as ex:
|
except (
|
||||||
|
asyncio.TimeoutError,
|
||||||
|
AccessoryNotFoundError,
|
||||||
|
EncryptionError,
|
||||||
|
AccessoryDisconnectedError,
|
||||||
|
) as ex:
|
||||||
del hass.data[KNOWN_DEVICES][conn.unique_id]
|
del hass.data[KNOWN_DEVICES][conn.unique_id]
|
||||||
with contextlib.suppress(asyncio.TimeoutError):
|
with contextlib.suppress(asyncio.TimeoutError):
|
||||||
await conn.pairing.close()
|
await conn.pairing.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user