python-openevse-http 0.1.75__tar.gz → 0.1.76__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.75
3
+ Version: 0.1.76
4
4
  Summary: Python wrapper for OpenEVSE HTTP API
5
5
  Home-page: https://github.com/firstof9/python-openevse-http
6
6
  Author: firstof9
@@ -91,6 +91,7 @@ class OpenEVSE:
91
91
  self.websocket: OpenEVSEWebsocket | None = None
92
92
  self.callback: Callable | None = None
93
93
  self._loop = None
94
+ self.tasks = None
94
95
 
95
96
  async def process_request(
96
97
  self,
@@ -295,6 +296,11 @@ class OpenEVSE:
295
296
  self._ws_listening = False
296
297
  assert self.websocket
297
298
  await self.websocket.close()
299
+ if self._loop:
300
+ try:
301
+ self._loop.cancel()
302
+ except AttributeError:
303
+ pass
298
304
 
299
305
  def is_coroutine_function(self, callback):
300
306
  """Check if a callback is a coroutine function."""
@@ -142,6 +142,7 @@ class OpenEVSEWebsocket:
142
142
  async def close(self):
143
143
  """Close the listening websocket."""
144
144
  await OpenEVSEWebsocket.state.fset(self, STATE_STOPPED)
145
+ await self.session.close()
145
146
 
146
147
  async def keepalive(self):
147
148
  """Send ping requests to websocket."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-openevse-http
3
- Version: 0.1.75
3
+ Version: 0.1.76
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.75"
9
+ VERSION = "0.1.76"
10
10
 
11
11
  setup(
12
12
  name="python_openevse_http",