From d00e971cd273a254e4d6bfb1b511c533ad18a417 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Fri, 5 Jul 2024 18:54:03 -0400 Subject: [PATCH] Do not iterate over serial ports when probing --- zigpy_zigate/api.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/zigpy_zigate/api.py b/zigpy_zigate/api.py index 6f4ab3b..178b065 100644 --- a/zigpy_zigate/api.py +++ b/zigpy_zigate/api.py @@ -592,15 +592,5 @@ async def probe(cls, device_config: Dict[str, Any]) -> bool: async def _probe(self) -> None: """Open port and try sending a command""" - try: - device = next( - serial.tools.list_ports.grep( - self._config[zigpy_zigate.config.CONF_DEVICE_PATH] - ) - ) - if device.description == "ZiGate": - return - except StopIteration: - pass await self.connect() await self.set_raw_mode()