python-roborock 0.4.8__tar.gz → 0.4.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-roborock
3
- Version: 0.4.8
3
+ Version: 0.4.9
4
4
  Summary:
5
5
  License: GPL-3.0-only
6
6
  Author: humbertogontijo
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-roborock"
3
- version = "0.4.8"
3
+ version = "0.4.9"
4
4
  description = ""
5
5
  authors = ["humbertogontijo <humbertogontijo@users.noreply.github.com>"]
6
6
  license = "GPL-3.0-only"
@@ -5,7 +5,7 @@ import logging
5
5
  import secrets
6
6
  import threading
7
7
  from asyncio import Lock
8
- from typing import Any, Callable
8
+ from typing import Any
9
9
  from urllib.parse import urlparse
10
10
 
11
11
  import paho.mqtt.client as mqtt
@@ -22,7 +22,7 @@ from .containers import (
22
22
  )
23
23
  from .roborock_queue import RoborockQueue
24
24
  from .typing import (
25
- RoborockCommand, RoborockDeviceProp,
25
+ RoborockCommand, RoborockDeviceProp, RoborockDeviceInfo,
26
26
  )
27
27
  from .util import run_in_executor
28
28
 
@@ -34,10 +34,10 @@ MQTT_KEEPALIVE = 60
34
34
  class RoborockMqttClient(RoborockClient, mqtt.Client):
35
35
  _thread: threading.Thread
36
36
 
37
- def __init__(self, user_data: UserData, device_localkey: dict[str, str]) -> None:
37
+ def __init__(self, user_data: UserData, devices_info: dict[str, RoborockDeviceInfo]) -> None:
38
38
  rriot = user_data.rriot
39
39
  endpoint = base64.b64encode(md5bin(rriot.endpoint)[8:14]).decode()
40
- RoborockClient.__init__(self, endpoint, device_localkey)
40
+ RoborockClient.__init__(self, endpoint, devices_info)
41
41
  mqtt.Client.__init__(self, protocol=mqtt.MQTTv5)
42
42
  self._mqtt_user = rriot.user
43
43
  self._hashed_user = md5hex(self._mqtt_user + ":" + rriot.endpoint)[2:10]
@@ -192,7 +192,7 @@ class RoborockMqttClient(RoborockClient, mqtt.Client):
192
192
  _LOGGER.debug(f"id={request_id} Requesting method {method} with {params}")
193
193
  request_protocol = 101
194
194
  response_protocol = 301 if method in SPECIAL_COMMANDS else 102
195
- msg = super()._encode_msg(device_id, request_protocol, timestamp, payload)
195
+ msg = super()._encode_msg(device_id, request_id, request_protocol, timestamp, payload)
196
196
  self._send_msg_raw(device_id, msg)
197
197
  (response, err) = await self._async_response(request_id, response_protocol)
198
198
  if err:
File without changes