pymammotion 0.4.51__py3-none-any.whl → 0.4.53__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.
@@ -36,8 +36,6 @@ def find_next_integer(lst: list[int], current_hash: int) -> int | None:
36
36
  class MammotionBaseDevice:
37
37
  """Base class for Mammotion devices."""
38
38
 
39
- command_sent_time: datetime = time.time()
40
-
41
39
  def __init__(self, state_manager: StateManager, cloud_device: Device) -> None:
42
40
  """Initialize MammotionBaseDevice."""
43
41
  self.loop = asyncio.get_event_loop()
@@ -46,6 +44,7 @@ class MammotionBaseDevice:
46
44
  self._raw_mower_data: RawMowerData = RawMowerData()
47
45
  self._notify_future: asyncio.Future[bytes] | None = None
48
46
  self._cloud_device = cloud_device
47
+ self.command_sent_time: datetime = time.time()
49
48
 
50
49
  async def datahash_response(self, hash_ack: NavGetHashListAck) -> None:
51
50
  """Handle datahash responses for root level hashs."""
@@ -133,7 +133,7 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
133
133
  """Stop all tasks and disconnect."""
134
134
  if self._ble_sync_task:
135
135
  self._ble_sync_task.cancel()
136
- if self._client is not None:
136
+ if self._client is not None and self._client.is_connected:
137
137
  await self._client.disconnect()
138
138
 
139
139
  async def queue_command(self, key: str, **kwargs: Any) -> bytes | None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pymammotion
3
- Version: 0.4.51
3
+ Version: 0.4.53
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: Michael Arthur
@@ -70,9 +70,9 @@ pymammotion/mammotion/commands/messages/video.py,sha256=KN9Zj8h7EnVipVBOzHxWF4RX
70
70
  pymammotion/mammotion/control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
71
  pymammotion/mammotion/control/joystick.py,sha256=QfBVxM_gxpWsZAGO90whtgxCI2tIZ3TTad9wHIPsU9s,5640
72
72
  pymammotion/mammotion/devices/__init__.py,sha256=f2qQFPgLGmV85W2hSlMUh5BYuht9o_Ar_JEAAMD4fsE,102
73
- pymammotion/mammotion/devices/base.py,sha256=wM2c2vjfPjYPYmMTk77E833IN1ioearcU2pcLZUkP7I,12030
73
+ pymammotion/mammotion/devices/base.py,sha256=qDh7P7fnakDKgxTqjNLcQg8eE-6gHJaXAV0ONjhy_IU,12038
74
74
  pymammotion/mammotion/devices/mammotion.py,sha256=SBisZ7zbLQmo8WpLQze5lI2gDawZpzLWZ9ANTkiLV8s,14451
75
- pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=sgfL4sz6WkIlr2bvYplzxsudmzATNE-z3UGe0K1Csng,18919
75
+ pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=MWoaiHqNRh_bHlvjmVPRjYVauVNIVgDpOIsC-UDvYMc,18949
76
76
  pymammotion/mammotion/devices/mammotion_cloud.py,sha256=P352E-pcbG6wA-RXubI51EUJ3UUQcqJkxRDIqh3g-58,14217
77
77
  pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
78
78
  pymammotion/mqtt/linkkit/__init__.py,sha256=ENgc3ynd2kd9gMQR3-kgmCu6Ed9Y6XCIzU0zFReUlkk,80
@@ -123,7 +123,7 @@ pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tp
123
123
  pymammotion/utility/mur_mur_hash.py,sha256=xEfOZVbqRawJj66eLgtnZ85OauDR47oIPr29OHelzPI,4468
124
124
  pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
125
125
  pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
126
- pymammotion-0.4.51.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
127
- pymammotion-0.4.51.dist-info/METADATA,sha256=Y7fzDJmH_6qLbcG3TML6ZkEizSzZWYhQHoekOKfm3F8,3878
128
- pymammotion-0.4.51.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
129
- pymammotion-0.4.51.dist-info/RECORD,,
126
+ pymammotion-0.4.53.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
127
+ pymammotion-0.4.53.dist-info/METADATA,sha256=A6dRJCP2PhOaQ9ki4DczlJZ3IuWmhtC2IslXzOCkayk,3878
128
+ pymammotion-0.4.53.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
129
+ pymammotion-0.4.53.dist-info/RECORD,,