From 18d0aee391c1e9bb4c2c84c37bfb2c86fd4fbe46 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sat, 23 Jan 2021 21:08:33 +0300 Subject: [PATCH] small fix --- custom_components/mega/hub.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/mega/hub.py b/custom_components/mega/hub.py index 0f62a7d..5ac7247 100644 --- a/custom_components/mega/hub.py +++ b/custom_components/mega/hub.py @@ -177,7 +177,8 @@ class MegaD: qos=2, retain=False, ) - await asyncio.wait_for(self.cnd.wait_for(lambda: self.last_port == port), timeout=15) + await asyncio.wait_for(self.cnd.wait(), timeout=15) + await asyncio.sleep(0.05) async def get_all_ports(self): for x in range(37):