mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix upb config flow connect (#121571)
This commit is contained in:
parent
3ea694a069
commit
b07fcb6a4a
@ -39,12 +39,13 @@ async def _validate_input(data):
|
|||||||
url = _make_url_from_data(data)
|
url = _make_url_from_data(data)
|
||||||
|
|
||||||
upb = upb_lib.UpbPim({"url": url, "UPStartExportFile": file_path})
|
upb = upb_lib.UpbPim({"url": url, "UPStartExportFile": file_path})
|
||||||
|
|
||||||
|
upb.connect(_connected_callback)
|
||||||
|
|
||||||
if not upb.config_ok:
|
if not upb.config_ok:
|
||||||
_LOGGER.error("Missing or invalid UPB file: %s", file_path)
|
_LOGGER.error("Missing or invalid UPB file: %s", file_path)
|
||||||
raise InvalidUpbFile
|
raise InvalidUpbFile
|
||||||
|
|
||||||
upb.connect(_connected_callback)
|
|
||||||
|
|
||||||
with suppress(TimeoutError):
|
with suppress(TimeoutError):
|
||||||
async with asyncio.timeout(VALIDATE_TIMEOUT):
|
async with asyncio.timeout(VALIDATE_TIMEOUT):
|
||||||
await connected_event.wait()
|
await connected_event.wait()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user