From e6f8845103dc0841402e9daa020b593c2b4eae4f Mon Sep 17 00:00:00 2001 From: Maikel Punie Date: Mon, 13 Jan 2025 15:56:02 +0100 Subject: [PATCH] also support removal from the on_status update callback --- velbusaio/channels.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/velbusaio/channels.py b/velbusaio/channels.py index c55a642..405d79d 100644 --- a/velbusaio/channels.py +++ b/velbusaio/channels.py @@ -197,6 +197,9 @@ def get_categories(self) -> list[str]: def on_status_update(self, meth: Callable[[], Awaitable[None]]) -> None: self._on_status_update.append(meth) + def remove_on_status_update(self, meth: Callable[[], Awaitable[None]]) -> None: + self._on_status_update.remove(meth) + def get_counter_state(self) -> int: raise NotImplementedError()