pymammotion 0.2.32__py3-none-any.whl → 0.2.33__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.
@@ -158,13 +158,16 @@ class Mammotion:
158
158
  await loop.run_in_executor(None, self.mqtt.connect_async)
159
159
 
160
160
  for device in cloud_client.devices_by_account_response.data.data:
161
- if device.deviceName.startswith(("Luba-", "Yuka-")) and self.devices.get_device(device.deviceName) is None:
161
+ mower_device = self.devices.get_device(device.deviceName)
162
+ if device.deviceName.startswith(("Luba-", "Yuka-")) and mower_device is None:
162
163
  self.devices.add_device(
163
164
  MammotionMixedDeviceManager(name=device.deviceName, cloud_device=device, mqtt=self.mqtt)
164
165
  )
165
- elif device.deviceName.startswith(("Luba-", "Yuka-")) and self.devices.get_device(device.deviceName):
166
- device = self.devices.get_device(device.deviceName)
167
- device.replace_mqtt(self.mqtt)
166
+ elif device.deviceName.startswith(("Luba-", "Yuka-")) and mower_device:
167
+ if mower_device.cloud() is None:
168
+ mower_device.add_cloud(cloud_device=device, mqtt=self.mqtt)
169
+ else:
170
+ device.replace_mqtt(self.mqtt)
168
171
 
169
172
 
170
173
  def set_disconnect_strategy(self, disconnect: bool) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymammotion
3
- Version: 0.2.32
3
+ Version: 0.2.33
4
4
  Summary:
5
5
  License: GNU-3.0
6
6
  Author: Michael Arthur
@@ -60,7 +60,7 @@ pymammotion/mammotion/control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
60
60
  pymammotion/mammotion/control/joystick.py,sha256=QfBVxM_gxpWsZAGO90whtgxCI2tIZ3TTad9wHIPsU9s,5640
61
61
  pymammotion/mammotion/devices/__init__.py,sha256=f2qQFPgLGmV85W2hSlMUh5BYuht9o_Ar_JEAAMD4fsE,102
62
62
  pymammotion/mammotion/devices/base.py,sha256=s3xnEHzPIbo9LU0WB7I-y04JiX0CjR5g35Q_-kpWE70,11346
63
- pymammotion/mammotion/devices/mammotion.py,sha256=CVyhm3cSrX4ZLgMLHmFoWjyhBsPrwZbSKI5AuJC6jOs,9630
63
+ pymammotion/mammotion/devices/mammotion.py,sha256=ijKaQ5mlvOoolBMYJ8ZoDlPzNO0Wa2hJaE04y2tUJNs,9727
64
64
  pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=3XUjhE2sb_2aZnJlevmwxd99zR_4qZOfaK86h6hKV5E,17303
65
65
  pymammotion/mammotion/devices/mammotion_cloud.py,sha256=mCzj-SOSke6mU010NQcO-r9qtHyPXCCY0OlYiO-MA9A,9915
66
66
  pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
@@ -117,7 +117,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
117
117
  pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
118
118
  pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
119
119
  pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
120
- pymammotion-0.2.32.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
121
- pymammotion-0.2.32.dist-info/METADATA,sha256=4T0TPLB0YtQxWV71xVzvnd_Iw7RVuxf_EzCQVPTs30U,4052
122
- pymammotion-0.2.32.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
123
- pymammotion-0.2.32.dist-info/RECORD,,
120
+ pymammotion-0.2.33.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
121
+ pymammotion-0.2.33.dist-info/METADATA,sha256=AtRlxf3ChUnjRY6t51vRg9O3KGaW0g_hDMw0uy6qQdw,4052
122
+ pymammotion-0.2.33.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
123
+ pymammotion-0.2.33.dist-info/RECORD,,