Skip to content

Commit 4af1490

Browse files
authored
fix: add some extra data protocol checking (#331)
1 parent 67bbbb1 commit 4af1490

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

roborock/roborock_message.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class RoborockDataProtocol(RoborockEnum):
3636
TASK_CANCEL_IN_MOTION = 132
3737
CHARGE_STATUS = 133
3838
DRYING_STATUS = 134
39+
OFFLINE_STATUS = 135
3940

4041
@classmethod
4142
def _missing_(cls: type[RoborockEnum], key) -> RoborockEnum:

roborock/version_1_apis/roborock_client_v1.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,12 @@ def on_message_received(self, messages: list[RoborockMessage]) -> None:
430430
consumable = Consumable.from_dict(value)
431431
for listener in self.listener_model.protocol_handlers.get(data_protocol, []):
432432
listener(consumable)
433+
elif data_protocol in {
434+
RoborockDataProtocol.ADDITIONAL_PROPS,
435+
RoborockDataProtocol.DRYING_STATUS,
436+
}:
437+
# Known data protocol, but not yet sure how to correctly utilize it.
438+
return
433439
else:
434440
self._logger.warning(
435441
f"Unknown data protocol {data_point_number}, please create an "

0 commit comments

Comments
 (0)