Skip to content

Commit 8786494

Browse files
committed
fix: ensure proper datapoint decoding check in v1_protocol and update V1Channel connection strategy documentation
1 parent 8245d18 commit 8786494

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

docs/DEVICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ graph LR
357357
1. **Temporary Subscriptions**: Each RPC creates a temporary subscription that matches the request ID
358358
2. **Subscription Reuse**: `MqttSession` keeps subscriptions alive for 60 seconds (or idle timeout) to enable reuse during command bursts
359359
3. **Timeout Handling**: Commands timeout after 10 seconds if no response is received
360-
4. **Multiple Strategies**: `V1Channel` tries local first, then falls back to MQTT if local fails
360+
4. **Multiple Strategies**: `V1Channel` tries connect to both Local faster local commands and MQTT for streaming updates.
361361

362362
## Class Design & Components
363363

roborock/protocols/v1_protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def decode_data_protocol_message(message: RoborockMessage) -> dict[RoborockDataP
235235
Returns a dict mapping RoborockDataProtocol to values, or None if the
236236
message does not contain any recognized data protocol updates.
237237
"""
238-
if not (datapoints := _decode_dps_message(message)):
238+
if (datapoints := _decode_dps_message(message)) is None:
239239
return None
240240

241241
result: dict[RoborockDataProtocol, Any] = {}

0 commit comments

Comments
 (0)