sillyfrog / aiopulse2

Apache License 2.0
8 stars 3 forks source link

Error when trying to connect #12

Closed tonymyatt closed 2 days ago

tonymyatt commented 3 days ago

Hi @sillyfrog,

I'm trying to use your HA integration and traced an error back to your API library. The code appears to be checking the socket is open, using an attribute which doesn't exist. I can't find "open" in the documentation of WebSockets, its perplexing me how this is working for anyone. Only thing I can think is change in attributes of library versions. I'm using: Core 2024.11.1 Supervisor 2024.11.2 Operating System 13.2 Frontend 20241106.2 Automate-Pulse-v2 0.9.12 aiopulse2 0.9.1

Hoping you can have a look at let me know, I'm more than happy to contribute to the code base.

File "/home/vscode/.local/ha-venv/lib/python3.12/site-packages/aiopulse2/devices.py", line 252, in heartbeat if self.ws and self.ws.open and self.handshake.is_set(): ^^^^^^^^^^^^ AttributeError: 'ClientConnection' object has no attribute 'open'

sillyfrog commented 2 days ago

This is fixed in release v0.10.0. HA updated the version of websockets, which changed the API.

See https://github.com/sillyfrog/Automate-Pulse-v2/issues/34 for the HACS release.