Skip to content

Commit 3a5874e

Browse files
committed
fix: add version to ping
1 parent b4b6730 commit 3a5874e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

roborock/version_1_apis/roborock_local_client_v1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ async def hello(self):
163163
raise RoborockException("Failed to connect to device with any known protocol")
164164

165165
async def ping(self) -> None:
166-
ping_message = RoborockMessage(
167-
protocol=RoborockMessageProtocol.PING_REQUEST,
168-
)
166+
# Realistically, this should be set here, but this is to be safe and for typing.
167+
version = b"1.0" if self._version is None else self._version.encode()
168+
ping_message = RoborockMessage(protocol=RoborockMessageProtocol.PING_REQUEST, version=version)
169169
await self._send_message(
170170
roborock_message=ping_message,
171171
request_id=ping_message.seq,

0 commit comments

Comments
 (0)