Skip to content

Commit

Permalink
also support removal from the on_status update callback
Browse files Browse the repository at this point in the history
  • Loading branch information
cereal2nd committed Jan 13, 2025
1 parent 330e042 commit e6f8845
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions velbusaio/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit e6f8845

Please sign in to comment.