From 000c185b93d6b62d9cd74880014cc820d62f2d7d Mon Sep 17 00:00:00 2001 From: Benjamin Braatz Date: Tue, 31 Mar 2026 22:06:55 +0200 Subject: [PATCH] Change to new websockets API --- controlpi_plugins/wsclient.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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", -- 2.43.0