Skip to content

Commit 49d68a1

Browse files
committed
fix: Lower log level for internal protocol connection details
1 parent a80b306 commit 49d68a1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

roborock/devices/local_channel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def is_local_connected(self) -> bool:
176176
async def connect(self) -> None:
177177
"""Connect to the device and negotiate protocol."""
178178
if self._is_connected:
179-
_LOGGER.warning("Already connected")
179+
_LOGGER.debug("Unexpected call to connect when already connected")
180180
return
181181
_LOGGER.debug("Connecting to %s:%s", self._host, _PORT)
182182
loop = asyncio.get_running_loop()
@@ -214,7 +214,7 @@ def close(self) -> None:
214214

215215
def _connection_lost(self, exc: Exception | None) -> None:
216216
"""Handle connection loss."""
217-
_LOGGER.warning("Connection lost to %s", self._host, exc_info=exc)
217+
_LOGGER.debug("Connection lost to %s", self._host, exc_info=exc)
218218
if self._keep_alive_task:
219219
self._keep_alive_task.cancel()
220220
self._keep_alive_task = None

roborock/devices/v1_channel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async def send_command(
9090
try:
9191
decoded_response = await self._send_rpc(strategy, request)
9292
except RoborockException as e:
93-
_LOGGER.warning("Command %s failed on %s channel: %s", method, strategy.name, e)
93+
_LOGGER.debug("Command %s failed on %s channel: %s", method, strategy.name, e)
9494
last_exception = e
9595
except Exception as e:
9696
_LOGGER.exception("Unexpected error sending command %s on %s channel", method, strategy.name)
@@ -282,7 +282,7 @@ async def subscribe(self, callback: Callable[[RoborockMessage], None]) -> Callab
282282
try:
283283
await self._local_connect(prefer_cache=True)
284284
except RoborockException as err:
285-
_LOGGER.warning("Could not establish local connection for device %s: %s", self._device_uid, err)
285+
_LOGGER.debug("First local connection attempt for device %s failed, will retry: %s", self._device_uid, err)
286286

287287
# Start a background task to manage the local connection health. This
288288
# happens independent of whether we were able to connect locally now.

0 commit comments

Comments
 (0)