python-openevse-http 0.1.66__tar.gz → 0.1.67__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python_openevse_http
3
- Version: 0.1.66
3
+ Version: 0.1.67
4
4
  Summary: Python wrapper for OpenEVSE HTTP API
5
5
  Home-page: https://github.com/firstof9/python-openevse-http
6
6
  Author: firstof9
@@ -239,8 +239,9 @@ class OpenEVSE:
239
239
  _LOGGER.debug("Using new event loop...")
240
240
 
241
241
  if not self._ws_listening:
242
+ _LOGGER.debug("Setting up websocket ping...")
243
+ self._loop.create_task(self.repeat(300, self.websocket.keepalive))
242
244
  self._loop.create_task(self.websocket.listen())
243
- self._loop.create_task(self.repeat(300, self.websocket.keepalive()))
244
245
  pending = asyncio.all_tasks()
245
246
  self._ws_listening = True
246
247
  try:
@@ -311,10 +312,8 @@ class OpenEVSE:
311
312
  *args and **kwargs are passed as the arguments to func.
312
313
  """
313
314
  while True:
314
- await asyncio.gather(
315
- func(*args, **kwargs),
316
- asyncio.sleep(interval),
317
- )
315
+ await asyncio.sleep(interval)
316
+ await func(*args, **kwargs)
318
317
 
319
318
  async def get_schedule(self) -> Union[Dict[str, str], Dict[str, Any]]:
320
319
  """Return the current schedule."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-openevse-http
3
- Version: 0.1.66
3
+ Version: 0.1.67
4
4
  Summary: Python wrapper for OpenEVSE HTTP API
5
5
  Home-page: https://github.com/firstof9/python-openevse-http
6
6
  Author: firstof9
@@ -6,7 +6,7 @@ from setuptools import find_packages, setup
6
6
 
7
7
  PROJECT_DIR = Path(__file__).parent.resolve()
8
8
  README_FILE = PROJECT_DIR / "README.md"
9
- VERSION = "0.1.66"
9
+ VERSION = "0.1.67"
10
10
 
11
11
  setup(
12
12
  name="python_openevse_http",