pymammotion 0.5.21__py3-none-any.whl → 0.5.23__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.

Potentially problematic release.


This version of pymammotion might be problematic. Click here for more details.

@@ -264,7 +264,7 @@ class StateManager:
264
264
 
265
265
  def _update_mul_data(self, message) -> None:
266
266
  """Media and video states."""
267
- mul_msg = betterproto2.which_one_of(message.net, "SubMul")
267
+ mul_msg = betterproto2.which_one_of(message.mul, "SubMul")
268
268
  match mul_msg[0]:
269
269
  case "Getlamprsp":
270
270
  lamp_resp: Getlamprsp = mul_msg[1]
@@ -20,7 +20,7 @@ from pymammotion.bluetooth import BleMessage
20
20
  from pymammotion.data.state_manager import StateManager
21
21
  from pymammotion.mammotion.commands.mammotion_command import MammotionCommand
22
22
  from pymammotion.mammotion.devices.base import MammotionBaseDevice
23
- from pymammotion.proto import LubaMsg, has_field
23
+ from pymammotion.proto import LubaMsg
24
24
 
25
25
  DBUS_ERROR_BACKOFF_TIME = 0.25
26
26
 
@@ -358,8 +358,8 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
358
358
  new_msg = LubaMsg().parse(data)
359
359
  res = betterproto2.which_one_of(new_msg, "LubaSubMsg")
360
360
  if res[0] == "net":
361
- if new_msg.net.todev_ble_sync != 0 or has_field(new_msg.net.toapp_wifi_iot_status):
362
- if has_field(new_msg.net.toapp_wifi_iot_status) and self._commands.get_device_product_key() == "":
361
+ if new_msg.net.todev_ble_sync != 0 or new_msg.net.toapp_wifi_iot_status is not None:
362
+ if new_msg.net.toapp_wifi_iot_status is not None and self._commands.get_device_product_key() == "":
363
363
  self._commands.set_device_product_key(new_msg.net.toapp_wifi_iot_status.productkey)
364
364
 
365
365
  await self._state_manager.notification(new_msg)
@@ -21,7 +21,7 @@ from pymammotion.data.state_manager import StateManager
21
21
  from pymammotion.event.event import DataEvent
22
22
  from pymammotion.mammotion.commands.mammotion_command import MammotionCommand
23
23
  from pymammotion.mammotion.devices.base import MammotionBaseDevice
24
- from pymammotion.proto import LubaMsg, has_field
24
+ from pymammotion.proto import LubaMsg
25
25
  from pymammotion.utility.constant.device_constant import NO_REQUEST_MODES
26
26
 
27
27
  _LOGGER = logging.getLogger(__name__)
@@ -371,7 +371,7 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
371
371
 
372
372
  res = betterproto2.which_one_of(new_msg, "LubaSubMsg")
373
373
  if res[0] == "net":
374
- if new_msg.net.todev_ble_sync != 0 or has_field(new_msg.net.toapp_wifi_iot_status):
374
+ if new_msg.net.todev_ble_sync != 0 or new_msg.net.toapp_wifi_iot_status is not None:
375
375
  return
376
376
 
377
377
  await self._state_manager.notification(new_msg)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pymammotion
3
- Version: 0.5.21
3
+ Version: 0.5.23
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: Michael Arthur
@@ -47,7 +47,7 @@ pymammotion/data/mqtt/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdr
47
47
  pymammotion/data/mqtt/event.py,sha256=pj65y93ACcTzUIJkHZC6s_pRFBYaNMSU1wyYRhiGvw4,5571
48
48
  pymammotion/data/mqtt/properties.py,sha256=laud9rE-JqBHWKZ44Dov2yMkp3Ld8ghpBwlZ4_3g9uQ,4321
49
49
  pymammotion/data/mqtt/status.py,sha256=qwZPevIzScePA_25nbRWMN7IhU-MhhtIl7fcZKAJfIc,1102
50
- pymammotion/data/state_manager.py,sha256=3EXOul7lorlKSnaSWqswBEXIlY9KC2D33VGNj_BBybE,12696
50
+ pymammotion/data/state_manager.py,sha256=mnoF4z1pT2q6n50KEpmmK9kMfOkI8xtp4tvBKmg832o,12696
51
51
  pymammotion/event/__init__.py,sha256=mgATR6vPHACNQ-0zH5fi7NdzeTCDV1CZyaWPmtUusi8,115
52
52
  pymammotion/event/event.py,sha256=Z8WYxv_-5khEqKjL1w4c_Et24G1Kdm8QFuIBylD3h3U,3021
53
53
  pymammotion/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -77,8 +77,8 @@ pymammotion/mammotion/control/joystick.py,sha256=QfBVxM_gxpWsZAGO90whtgxCI2tIZ3T
77
77
  pymammotion/mammotion/devices/__init__.py,sha256=f2qQFPgLGmV85W2hSlMUh5BYuht9o_Ar_JEAAMD4fsE,102
78
78
  pymammotion/mammotion/devices/base.py,sha256=-AYurMM70CFxrtm-YelttYAWdOGta4p4Cxg_5eD5cXY,12051
79
79
  pymammotion/mammotion/devices/mammotion.py,sha256=uk0mM6JSOzr84qkf8lECvlmTLX0UEQDXyowSeHZydek,15801
80
- pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=HAZMdXHFZewDpY7Y1Qi9kISUBsm2EjyVpwO_8-wS0p0,19354
81
- pymammotion/mammotion/devices/mammotion_cloud.py,sha256=JO8swZ7Kju11QZZtojlP2vyEBNR6MLh3nD8slLW0Jj8,16499
80
+ pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=lVqGice3fv-Xura10PuWUCMdtNXf84gtf3S1STw2hr4,19345
81
+ pymammotion/mammotion/devices/mammotion_cloud.py,sha256=ligdszu1KsHe0b0ZyyIibN_uXpxoSNp7ytNmsumidHY,16489
82
82
  pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
83
83
  pymammotion/mqtt/linkkit/__init__.py,sha256=ENgc3ynd2kd9gMQR3-kgmCu6Ed9Y6XCIzU0zFReUlkk,80
84
84
  pymammotion/mqtt/linkkit/h2client.py,sha256=w9Nvi_nY4CLD_fw-pHtYChwQf7e2TiAGeqkY_sF4cf0,19659
@@ -130,7 +130,7 @@ pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tp
130
130
  pymammotion/utility/mur_mur_hash.py,sha256=xEfOZVbqRawJj66eLgtnZ85OauDR47oIPr29OHelzPI,4468
131
131
  pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
132
132
  pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
133
- pymammotion-0.5.21.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
134
- pymammotion-0.5.21.dist-info/METADATA,sha256=ySiX_t_NmawHxz1pgQFIj_wscjiAAdtmvQiyZseJZ-A,3872
135
- pymammotion-0.5.21.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
136
- pymammotion-0.5.21.dist-info/RECORD,,
133
+ pymammotion-0.5.23.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
134
+ pymammotion-0.5.23.dist-info/METADATA,sha256=bRnsf92TchZIvnK2lgGscXO4bNepTbalQ2nxH-0NZyM,3872
135
+ pymammotion-0.5.23.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
136
+ pymammotion-0.5.23.dist-info/RECORD,,