From 40632e3aea0b48caab264c9c461f03f1994cfffc Mon Sep 17 00:00:00 2001 From: Thomas Protzner Date: Mon, 12 Aug 2024 19:07:28 +0000 Subject: [PATCH] remove not that important comment and move the other --- homeassistant/components/husqvarna_automower/coordinator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/husqvarna_automower/coordinator.py b/homeassistant/components/husqvarna_automower/coordinator.py index 6faa9a88927..10791a3842d 100644 --- a/homeassistant/components/husqvarna_automower/coordinator.py +++ b/homeassistant/components/husqvarna_automower/coordinator.py @@ -72,8 +72,9 @@ class AutomowerDataUpdateCoordinator(DataUpdateCoordinator[dict[str, MowerAttrib """Listen with the client.""" try: await automower_client.auth.websocket_connect() - await automower_client.start_listening() # Ensure we catch errors here too - self.reconnect_time = DEFAULT_RECONNECT_TIME # Reset reconnect time after successful connection + await automower_client.start_listening() + # Reset reconnect time after successful connection + self.reconnect_time = DEFAULT_RECONNECT_TIME except HusqvarnaWSServerHandshakeError as err: _LOGGER.debug( "Failed to connect to websocket. Trying to reconnect: %s",