diff --git a/custom_components/sonoff/core/ewelink/cloud.py b/custom_components/sonoff/core/ewelink/cloud.py index 687a8090..76c9f24e 100644 --- a/custom_components/sonoff/core/ewelink/cloud.py +++ b/custom_components/sonoff/core/ewelink/cloud.py @@ -519,9 +519,12 @@ async def run_forever(self, **kwargs): _LOGGER.debug(f"Cloud connection retrying in {delay} seconds") await asyncio.sleep(delay) - if not self.auth and not await self.login(**kwargs): - fails += 1 - continue + if not self.auth: + try: + assert await self.login(**kwargs) + except: + fails += 1 + continue if not await self.connect(): fails += 1