aioshelly 5.3.0__tar.gz → 5.3.2__tar.gz

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.
Files changed (28) hide show
  1. {aioshelly-5.3.0/aioshelly.egg-info → aioshelly-5.3.2}/PKG-INFO +1 -1
  2. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/const.py +1 -0
  3. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/rpc_device/wsrpc.py +7 -1
  4. {aioshelly-5.3.0 → aioshelly-5.3.2/aioshelly.egg-info}/PKG-INFO +1 -1
  5. {aioshelly-5.3.0 → aioshelly-5.3.2}/setup.py +1 -1
  6. {aioshelly-5.3.0 → aioshelly-5.3.2}/LICENSE +0 -0
  7. {aioshelly-5.3.0 → aioshelly-5.3.2}/MANIFEST.in +0 -0
  8. {aioshelly-5.3.0 → aioshelly-5.3.2}/README.md +0 -0
  9. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/__init__.py +0 -0
  10. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/ble/__init__.py +0 -0
  11. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/ble/const.py +0 -0
  12. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/block_device/__init__.py +0 -0
  13. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/block_device/coap.py +0 -0
  14. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/block_device/device.py +0 -0
  15. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/common.py +0 -0
  16. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/exceptions.py +0 -0
  17. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/json.py +0 -0
  18. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/py.typed +0 -0
  19. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/rpc_device/__init__.py +0 -0
  20. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/rpc_device/device.py +0 -0
  21. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/rpc_device/models.py +0 -0
  22. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly.egg-info/SOURCES.txt +0 -0
  23. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly.egg-info/dependency_links.txt +0 -0
  24. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly.egg-info/requires.txt +0 -0
  25. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly.egg-info/top_level.txt +0 -0
  26. {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly.egg-info/zip-safe +0 -0
  27. {aioshelly-5.3.0 → aioshelly-5.3.2}/requirements.txt +0 -0
  28. {aioshelly-5.3.0 → aioshelly-5.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioshelly
3
- Version: 5.3.0
3
+ Version: 5.3.2
4
4
  Summary: Asynchronous library to control Shelly devices.
5
5
  Home-page: https://github.com/home-assistant-libs/aioshelly
6
6
  Author: Paulus Schoutsen
@@ -70,6 +70,7 @@ MODEL_NAMES = {
70
70
  "SNSW-001X16EU": "Shelly Plus 1",
71
71
  "SNSW-0024X": "Shelly Plus I4",
72
72
  "SNSW-002P16EU": "Shelly Plus 2PM",
73
+ "SNSW-102P16EU": "Shelly Plus 2PM",
73
74
  "SPEM-003CEBEU": "Shelly Pro 3EM",
74
75
  "SPSW-001PE16EU": "Shelly Pro 1PM",
75
76
  "SPSW-001XE16EU": "Shelly Pro 1",
@@ -235,8 +235,14 @@ class WsRPC:
235
235
  # so schedule next heartbeat
236
236
  self._schedule_heartbeat()
237
237
  return
238
+ asyncio.create_task(self._ping_if_not_closed())
239
+
240
+ async def _ping_if_not_closed(self) -> None:
241
+ """Send ping if the client is not closed."""
242
+ if not self._client or self._client.closed:
243
+ return
238
244
  self._schedule_pong_response_cb()
239
- asyncio.create_task(self._client.ping())
245
+ await self._client.ping()
240
246
 
241
247
  def _pong_not_received(self) -> None:
242
248
  """Pong not received."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioshelly
3
- Version: 5.3.0
3
+ Version: 5.3.2
4
4
  Summary: Asynchronous library to control Shelly devices.
5
5
  Home-page: https://github.com/home-assistant-libs/aioshelly
6
6
  Author: Paulus Schoutsen
@@ -5,7 +5,7 @@ from setuptools import find_packages, setup
5
5
 
6
6
  PROJECT_DIR = Path(__file__).parent.resolve()
7
7
  README_FILE = PROJECT_DIR / "README.md"
8
- VERSION = "5.3.0"
8
+ VERSION = "5.3.2"
9
9
 
10
10
 
11
11
  setup(
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes