Skip to content

Commit

Permalink
feat: add nonce to diagnostic data
Browse files Browse the repository at this point in the history
  • Loading branch information
Lash-L committed Mar 3, 2024
1 parent 98b0c0f commit 33d5aca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion roborock/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

import asyncio
import base64
import dataclasses
import hashlib
import json
Expand Down Expand Up @@ -156,7 +157,9 @@ def __init__(self, endpoint: str, device_info: DeviceData, queue_timeout: int =
self._last_device_msg_in = self.time_func()
self._last_disconnection = self.time_func()
self.keep_alive = KEEPALIVE
self._diagnostic_data: dict[str, dict[str, Any]] = {}
self._diagnostic_data: dict[str, dict[str, Any]] = {
"misc_info": {"Nonce": base64.b64encode(self._nonce).decode("utf-8")}
}
self._logger = RoborockLoggerAdapter(device_info.device.name, _LOGGER)
self.cache: dict[CacheableAttribute, AttributeCache] = {
cacheable_attribute: AttributeCache(attr, self) for cacheable_attribute, attr in get_cache_map().items()
Expand Down

0 comments on commit 33d5aca

Please sign in to comment.