diff --git a/function/rooms.py b/function/rooms.py index a63de5b..1baeffc 100644 --- a/function/rooms.py +++ b/function/rooms.py @@ -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__)