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):