From 87aeff4e4c3b7a5b0463d3708a257114b4ec1724 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 30 Jan 2025 08:37:28 -0500 Subject: [PATCH] fix: ignore ping id during id check --- roborock/api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roborock/api.py b/roborock/api.py index ce26f472..c7b3d781 100644 --- a/roborock/api.py +++ b/roborock/api.py @@ -20,6 +20,7 @@ from .roborock_future import RoborockFuture from .roborock_message import ( RoborockMessage, + RoborockMessageProtocol, ) from .util import get_next_int @@ -101,7 +102,9 @@ async def _wait_response(self, request_id: int, queue: RoborockFuture) -> Any: def _async_response(self, request_id: int, protocol_id: int = 0) -> Any: queue = RoborockFuture(protocol_id) - if request_id in self._waiting_queue: + if request_id in self._waiting_queue and not ( + request_id == 2 and protocol_id == RoborockMessageProtocol.PING_REQUEST + ): new_id = get_next_int(10000, 32767) self._logger.warning( "Attempting to create a future with an existing id %s (%s)... New id is %s. "