From 5d44e0e68d2566dd7a128f281e3401699ebc335e Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Tue, 26 Aug 2025 19:05:29 +0200 Subject: [PATCH] Fix all off functionality --- function/rooms.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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__)