pymammotion 0.2.96__py3-none-any.whl → 0.2.97__py3-none-any.whl

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.
@@ -700,7 +700,7 @@ class CloudIOTGateway:
700
700
  def devices_by_account_response(self):
701
701
  return self._devices_by_account_response
702
702
 
703
- def set_http(self, mammotion_http) -> None:
703
+ def set_http(self, mammotion_http: MammotionHTTP) -> None:
704
704
  self.mammotion_http = mammotion_http
705
705
 
706
706
  @property
@@ -12,6 +12,7 @@ from pymammotion.data.model.device_info import MowerInfo
12
12
  from pymammotion.data.model.location import Location
13
13
  from pymammotion.data.model.report_info import ReportData
14
14
  from pymammotion.data.mqtt.properties import ThingPropertiesMessage
15
+ from pymammotion.http.model.http import ErrorInfo
15
16
  from pymammotion.proto.dev_net import DevNet
16
17
  from pymammotion.proto.luba_msg import LubaMsg
17
18
  from pymammotion.proto.luba_mul import SocMul
@@ -45,6 +46,7 @@ class MowingDevice(DataClassORJSONMixin):
45
46
  err_code_list_time: Optional[list] = field(default_factory=list)
46
47
  limits: DeviceLimits = field(default_factory=DeviceLimits)
47
48
  device: Optional[LubaMsg] = field(default_factory=LubaMsg)
49
+ error_codes: dict[str, ErrorInfo] = field(default_factory=dict)
48
50
 
49
51
  @classmethod
50
52
  def from_raw(cls, raw: dict) -> "MowingDevice":
pymammotion/http/http.py CHANGED
@@ -18,6 +18,7 @@ class MammotionHTTP:
18
18
  self._headers = dict()
19
19
  self.login_info = LoginResponseData.from_dict(response.data) if response.data else None
20
20
  self._headers["Authorization"] = f"Bearer {self.login_info.access_token}" if response.data else None
21
+ self.response = response
21
22
  self.msg = response.msg
22
23
  self.code = response.code
23
24
 
@@ -74,7 +75,7 @@ class MammotionHTTP:
74
75
  ),
75
76
  ) as resp:
76
77
  data = await resp.json()
77
- response = Response.from_dict(data)
78
+ response = Response[LoginResponseData].from_dict(data)
78
79
  # TODO catch errors from mismatch user / password elsewhere
79
80
  # Assuming the data format matches the expected structure
80
81
  return response
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymammotion
3
- Version: 0.2.96
3
+ Version: 0.2.97
4
4
  Summary:
5
5
  License: GNU-3.0
6
6
  Author: Michael Arthur
@@ -1,6 +1,6 @@
1
1
  pymammotion/__init__.py,sha256=BcwrItywpSECTxrTPwEuBExi_ekOrG2M2tbphuotIlE,1617
2
2
  pymammotion/aliyun/__init__.py,sha256=T1lkX7TRYiL4nqYanG4l4MImV-SlavSbuooC-W-uUGw,29
3
- pymammotion/aliyun/cloud_gateway.py,sha256=NDrDFEI86I-fv2wJL2PWsYXbty4SrltGBRh3_Ykpw5o,25769
3
+ pymammotion/aliyun/cloud_gateway.py,sha256=k3gh0-YSTjMUhHoG38YWx5-GjlAIkDWf4YvrPDz-ef4,25784
4
4
  pymammotion/aliyun/cloud_service.py,sha256=px7dUKow5Z7VyebjYzuKkzkm77XbUXYiFiYO_2e-UQ0,2207
5
5
  pymammotion/aliyun/model/aep_response.py,sha256=8f6GIP58ve8gd6AL3HBoXxsy0n2q4ygWvjELGnoOnVc,452
6
6
  pymammotion/aliyun/model/connect_response.py,sha256=Yz-fEbDzgGPTo5Of2oAjmFkSv08T7ze80pQU4k-gKIU,824
@@ -22,7 +22,7 @@ pymammotion/const.py,sha256=lWRxvTVdXnNHuxqvRkjO5ziK0Ic-fZMM6J2dbe5M6Nc,385
22
22
  pymammotion/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  pymammotion/data/model/__init__.py,sha256=aSyroxYQQS-WMRi6WmWm2js4wLa9nmsi160gx9tts4o,323
24
24
  pymammotion/data/model/account.py,sha256=vJM-KTf2q6eBfVC-UlNHBSmJvqHiCawZ40vnuhXhaz8,140
25
- pymammotion/data/model/device.py,sha256=uta1BzfCIKd7Z0naw7JcEGy273yMdcAJ7pjidfpGhKQ,12315
25
+ pymammotion/data/model/device.py,sha256=GQH9pNPcqb4zdl55r8dYIHgvXlwdA8k3xHwMVzNalys,12433
26
26
  pymammotion/data/model/device_config.py,sha256=b3zmArKg10NIheNGSugwWruLM_H4ySBlQxDgXAiB2es,2852
27
27
  pymammotion/data/model/device_info.py,sha256=ahz2xILdSYdX6SIVuVzz8QCfSQLefbQnpXrsiDpBDbY,585
28
28
  pymammotion/data/model/enums.py,sha256=EpKmO8yVUZyEnTY4yH0DMMVKYNQM42zpW1maUu0i3IE,1582
@@ -44,7 +44,7 @@ pymammotion/data/state_manager.py,sha256=vtBT28-5DY58hJMi_kqOUKnOq6rJ4fx1zX8yU7N
44
44
  pymammotion/event/__init__.py,sha256=mgATR6vPHACNQ-0zH5fi7NdzeTCDV1CZyaWPmtUusi8,115
45
45
  pymammotion/event/event.py,sha256=bj2RirSIRyBs0QvkcrOtwZWUX_8F3m1sySuHVyKmZLs,2143
46
46
  pymammotion/http/_init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
- pymammotion/http/http.py,sha256=ar-m05YI124aDrKX7L3lLfX7EB2RwVamxL5J1BZjhy0,3626
47
+ pymammotion/http/http.py,sha256=uPa6NeBKGbgw9FBIRfuSmFtp0nhsnK0NPtR1EBOkeEM,3678
48
48
  pymammotion/http/model/http.py,sha256=_hHqe9IfKDukUYKQDrZb_Tt_9rd5BNN1WKsaGIjsexM,1876
49
49
  pymammotion/mammotion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  pymammotion/mammotion/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -119,7 +119,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
119
119
  pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
120
120
  pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
121
121
  pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
122
- pymammotion-0.2.96.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
123
- pymammotion-0.2.96.dist-info/METADATA,sha256=ZslsTp5rdEyPQv7K1SD3qk-WyeLa3cjo2laLDoTZehc,3896
124
- pymammotion-0.2.96.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
125
- pymammotion-0.2.96.dist-info/RECORD,,
122
+ pymammotion-0.2.97.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
123
+ pymammotion-0.2.97.dist-info/METADATA,sha256=8Gy8NdtB4I1lUX-eP4I0f6xb8i7rdWzGlsHSZ_WUyMg,3896
124
+ pymammotion-0.2.97.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
125
+ pymammotion-0.2.97.dist-info/RECORD,,