Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion roborock/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from .roborock_future import RoborockFuture
from .roborock_message import (
RoborockMessage,
RoborockMessageProtocol,
)
from .util import get_next_int

Expand Down Expand Up @@ -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. "
Expand Down