Fix all off functionality
This commit is contained in:
parent
78dde64e92
commit
5d44e0e68d
@ -44,8 +44,11 @@ class room_collection(object):
|
||||
# attribute name is not private
|
||||
if not sub_name.startswith("__"):
|
||||
sub = getattr(self, sub_name)
|
||||
if sub.__class__.__bases__[0].__name__ in self.ALLOWED_CLASSES:
|
||||
# try to call all_off
|
||||
try:
|
||||
sub.all_off()
|
||||
except AttributeError:
|
||||
pass # don't mind, if sub has no method all_off
|
||||
|
||||
def summer_mode(self, device=None, key=None, data=None):
|
||||
logger.info("Changing to %s \"%s\"", "summer mode" if data else "winter_mode", type(self).__name__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user