Skip to content

Commit ceafcb6

Browse files
authored
feat: add nonce to diagnostic data (#195)
1 parent 98b0c0f commit ceafcb6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

roborock/api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
import asyncio
6+
import base64
67
import dataclasses
78
import hashlib
89
import json
@@ -156,7 +157,9 @@ def __init__(self, endpoint: str, device_info: DeviceData, queue_timeout: int =
156157
self._last_device_msg_in = self.time_func()
157158
self._last_disconnection = self.time_func()
158159
self.keep_alive = KEEPALIVE
159-
self._diagnostic_data: dict[str, dict[str, Any]] = {}
160+
self._diagnostic_data: dict[str, dict[str, Any]] = {
161+
"misc_info": {"Nonce": base64.b64encode(self._nonce).decode("utf-8")}
162+
}
160163
self._logger = RoborockLoggerAdapter(device_info.device.name, _LOGGER)
161164
self.cache: dict[CacheableAttribute, AttributeCache] = {
162165
cacheable_attribute: AttributeCache(attr, self) for cacheable_attribute, attr in get_cache_map().items()

0 commit comments

Comments
 (0)