mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Handle timeout on pairing close in HomeKit Controller (#79133)
This commit is contained in:
parent
d991c173a2
commit
d11916758c
@ -2,6 +2,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import contextlib
|
||||
import logging
|
||||
|
||||
import aiohomekit
|
||||
@ -41,7 +42,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
await conn.async_setup()
|
||||
except (AccessoryNotFoundError, EncryptionError, AccessoryDisconnectedError) as ex:
|
||||
del hass.data[KNOWN_DEVICES][conn.unique_id]
|
||||
await conn.pairing.close()
|
||||
with contextlib.suppress(asyncio.TimeoutError):
|
||||
await conn.pairing.close()
|
||||
raise ConfigEntryNotReady from ex
|
||||
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user