diff --git a/aiounifi/controller.py b/aiounifi/controller.py index fd70bb704c..400f1abc17 100644 --- a/aiounifi/controller.py +++ b/aiounifi/controller.py @@ -90,7 +90,7 @@ def __init__( self.site = site self.sslcontext = sslcontext self.callback = callback - self.can_retry_login = True + self.can_retry_login = False self.url = f"https://{self.host}:{self.port}" self.is_unifi_os = False @@ -128,6 +128,7 @@ async def login(self) -> None: } await self._request("post", url=url, json=auth) + self.can_retry_login = True if ( (response := self.last_response) is not None and response.status == HTTPStatus.OK