Skip to content

Commit b5a90e4

Browse files
committed
parse data into status variable
1 parent 7787545 commit b5a90e4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

openevsehttp/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,9 @@ def _start_listening(self):
243243

244244
if not self._ws_listening:
245245
self._loop.create_task(self.websocket.listen())
246+
pending = asyncio.all_tasks()
246247
self._ws_listening = True
247-
self._loop.run_until_complete()
248+
self._loop.run_until_complete(asyncio.gather(*pending))
248249

249250
def _update_status(self, msgtype, data, error):
250251
"""Update data from websocket listener."""
@@ -269,8 +270,8 @@ def _update_status(self, msgtype, data, error):
269270
self._ws_listening = False
270271

271272
elif msgtype == "data":
272-
_LOGGER.debug("ws_data: %s", data.json())
273-
update_data = data.json()
273+
_LOGGER.debug("ws_data: %s", data)
274+
update_data = data
274275

275276
for key, value in update_data:
276277
self._status[key] = value

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
PROJECT_DIR = Path(__file__).parent.resolve()
77
README_FILE = PROJECT_DIR / "README.md"
8-
VERSION = "0.1.8-19"
8+
VERSION = "0.1.8-20"
99

1010

1111
setup(

0 commit comments

Comments
 (0)