pymammotion 0.2.32__py3-none-any.whl → 0.2.34__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.
@@ -60,7 +60,7 @@ class DataEvent:
60
60
  if data:
61
61
  await self.on_data_event(data)
62
62
  else:
63
- await self.on_data_event(None)
63
+ await self.on_data_event()
64
64
 
65
65
  def add_subscribers(self, obj_method) -> None:
66
66
  self.on_data_event += obj_method
@@ -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.34
4
4
  Summary:
5
5
  License: GNU-3.0
6
6
  Author: Michael Arthur
@@ -40,7 +40,7 @@ pymammotion/data/mqtt/properties.py,sha256=HkBPghr26L9_b4QaOi1DtPgb0UoPIOGSe9wb3
40
40
  pymammotion/data/mqtt/status.py,sha256=zqnlo-MzejEQZszl0i0Wucoc3E76x6UtI9JLxoBnu54,1067
41
41
  pymammotion/data/state_manager.py,sha256=fhV5icW9q4rCsHdD8lh4wvaDSzq6NP2116Wgdc7mR_U,3364
42
42
  pymammotion/event/__init__.py,sha256=mgATR6vPHACNQ-0zH5fi7NdzeTCDV1CZyaWPmtUusi8,115
43
- pymammotion/event/event.py,sha256=P1JuP_Jy-pti8sN-zRDzUQSchx9ynoHmDEohL4gwhGA,2038
43
+ pymammotion/event/event.py,sha256=UzYnxV5DfvMDK3E06UvSzvzuBbaXOOUwO6xYt_zn9To,2034
44
44
  pymammotion/http/_init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
45
  pymammotion/http/http.py,sha256=OZHjQY9ZLdlsKK6MDqqV79JIH9WYWJe3-ey-WWbe2z4,2642
46
46
  pymammotion/http/model/http.py,sha256=_aVrtZZyR4EdR6GcuqMP9vH8qBLN7nKu0U2OeraCcG0,1607
@@ -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.34.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
121
+ pymammotion-0.2.34.dist-info/METADATA,sha256=RA-Cn-7qH2KLMJEGosBcGfrZIsXLhPPa8Twcxg8knU8,4052
122
+ pymammotion-0.2.34.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
123
+ pymammotion-0.2.34.dist-info/RECORD,,