From 36261d57caf817a228084974f3aa29b8801057c7 Mon Sep 17 00:00:00 2001 From: flexxor Date: Thu, 4 Aug 2022 22:06:51 +0200 Subject: [PATCH] add callback-property --- enocean/communicators/communicator.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/enocean/communicators/communicator.py b/enocean/communicators/communicator.py index 9aff7c0..f5eeceb 100644 --- a/enocean/communicators/communicator.py +++ b/enocean/communicators/communicator.py @@ -81,6 +81,14 @@ def parse(self): self.__callback(packet) self.logger.debug(packet) + @property # getter + def callback(self): + return self.__callback + + @callback.setter + def callback(self, callback): + self.__callback = callback + @property def base_id(self): ''' Fetches Base ID from the transmitter, if required. Otherwise returns the currently set Base ID. '''