Fix: all_off
This commit is contained in:
parent
6f57eebee5
commit
991eeeb2d6
2
videv.py
2
videv.py
@ -169,6 +169,7 @@ class all_off(videv_base):
|
||||
mqtt_client.add_callback(all_off_topic, self.all_off)
|
||||
|
||||
def __check_inst_capabilities__(self, name, inst):
|
||||
if hasattr(inst, "ADD_TO_VIDEV_ALL_OFF"):
|
||||
# fits to specified classes
|
||||
try:
|
||||
# all_off method is callable
|
||||
@ -176,6 +177,7 @@ class all_off(videv_base):
|
||||
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user