From d16e455d2ecd10f41e401f5ce7abda28678bc007 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Fri, 5 Jul 2024 18:53:16 -0400 Subject: [PATCH] Run port discovery in thread (does anything use this?) --- zigpy_zigate/uart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zigpy_zigate/uart.py b/zigpy_zigate/uart.py index d0ca340..364576a 100644 --- a/zigpy_zigate/uart.py +++ b/zigpy_zigate/uart.py @@ -141,7 +141,7 @@ async def connect(device_config: Dict[str, Any], api, loop=None): port = device_config[CONF_DEVICE_PATH] if port == "auto": - port = c.discover_port() + port = await loop.run_in_executor(None, c.discover_port) if c.is_pizigate(port): LOGGER.debug("PiZiGate detected")