BugFix: All off functionality

This commit is contained in:
Dirk Alders 2023-11-13 20:46:52 +01:00
parent bc445a6ec4
commit e565dd717b

View File

@ -22,7 +22,7 @@ class room(object):
logger.info("Switching all off \"%s\"", type(self).__name__) logger.info("Switching all off \"%s\"", type(self).__name__)
for name, obj in inspect.getmembers(self): for name, obj in inspect.getmembers(self):
try: try:
if obj.__module__ == 'devices': if obj.__module__.startswith('devices'):
obj.all_off() obj.all_off()
except AttributeError: except AttributeError:
pass # not a module or has no method all_off pass # not a module or has no method all_off