Handle HusqvarnaWSClientError (#150145)

This commit is contained in:
Thomas55555
2025-08-08 22:12:18 +02:00
committed by Franck Nijhof
parent 6f4d405b26
commit 42a3bef34a

View File

@@ -12,6 +12,7 @@ from aioautomower.exceptions import (
ApiError, ApiError,
AuthError, AuthError,
HusqvarnaTimeoutError, HusqvarnaTimeoutError,
HusqvarnaWSClientError,
HusqvarnaWSServerHandshakeError, HusqvarnaWSServerHandshakeError,
) )
from aioautomower.model import MowerDictionary from aioautomower.model import MowerDictionary
@@ -142,7 +143,7 @@ class AutomowerDataUpdateCoordinator(DataUpdateCoordinator[MowerDictionary]):
# Reset reconnect time after successful connection # Reset reconnect time after successful connection
self.reconnect_time = DEFAULT_RECONNECT_TIME self.reconnect_time = DEFAULT_RECONNECT_TIME
await automower_client.start_listening() await automower_client.start_listening()
except HusqvarnaWSServerHandshakeError as err: except (HusqvarnaWSServerHandshakeError, HusqvarnaWSClientError) as err:
_LOGGER.debug( _LOGGER.debug(
"Failed to connect to websocket. Trying to reconnect: %s", "Failed to connect to websocket. Trying to reconnect: %s",
err, err,