From: Benjamin Braatz Date: Tue, 31 Mar 2026 20:06:55 +0000 (+0200) Subject: Change to new websockets API X-Git-Tag: v0.4.1 X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;p=graphit%2Fcontrolpi-wsclient.git Change to new websockets API --- diff --git a/controlpi_plugins/wsclient.py b/controlpi_plugins/wsclient.py index 919b462..fcd5933 100644 --- a/controlpi_plugins/wsclient.py +++ b/controlpi_plugins/wsclient.py @@ -5,7 +5,7 @@ import fcntl import json import socket import struct -from websockets.client import connect, WebSocketClientProtocol +from websockets.asyncio.client import connect, ClientConnection from controlpi import BasePlugin, Message, MessageTemplate, BusException @@ -145,7 +145,7 @@ class WSClient(BasePlugin): def process_conf(self) -> None: """Register plugin as bus client.""" - self._websocket: Optional[WebSocketClientProtocol] = None + self._websocket: Optional[ClientConnection] = None if "client" in self.conf: self._client = self.conf["client"] if "interface" in self.conf: diff --git a/setup.py b/setup.py index 9a51b87..a040b75 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as readme_file: setuptools.setup( name="controlpi-wsclient", - version="0.4.0", + version="0.4.1", author="Graph-IT GmbH", author_email="info@graph-it.com", description="ControlPi Plugin for Websocket Clients",