From 991eeeb2d67d8c918e638929adb1b53644a472e9 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Sat, 30 Aug 2025 17:09:18 +0200 Subject: [PATCH] Fix: all_off --- videv.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/videv.py b/videv.py index c9006af..076b3a2 100644 --- a/videv.py +++ b/videv.py @@ -169,13 +169,15 @@ class all_off(videv_base): mqtt_client.add_callback(all_off_topic, self.all_off) def __check_inst_capabilities__(self, name, inst): - # fits to specified classes - try: - # all_off method is callable - return callable(inst.all_off) - except AttributeError: - # all_off method does not exist - return False + if hasattr(inst, "ADD_TO_VIDEV_ALL_OFF"): + # fits to specified classes + try: + # all_off method is callable + return callable(inst.all_off) + except AttributeError: + # all_off method does not exist + return False + return False def __add_instances__(self, name, inst, level=0): if self.__check_inst_capabilities__(name, inst):