From 036cddeb8ee1f9bc68d73c1d51910abf5a86dad4 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Wed, 25 Jan 2023 11:33:46 +0100 Subject: [PATCH] 2nd Bug-Fix: modules.brightness_choose_n_action --- function/modules.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/function/modules.py b/function/modules.py index 0cf4235..a7176cc 100644 --- a/function/modules.py +++ b/function/modules.py @@ -67,8 +67,9 @@ class brightness_choose_n_action(common_base): if data is True: self.set(self.KEY_ACTIVE_DEVICE, self.callback_device_list.index((device, key))) else: - if self.callback_device_list[self[self.KEY_ACTIVE_DEVICE]][0] == device: - self.choose_next_device() + if self[self.KEY_ACTIVE_DEVICE] is not None: + if self.callback_device_list[self[self.KEY_ACTIVE_DEVICE]][0] == device: + self.choose_next_device() def choose_prev_device(self, device=None, key=None, data=None): if self[self.KEY_ACTIVE_DEVICE] is not None: