From 2864660082399a1eec1465316a3471455843a31a Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Fri, 23 Dec 2022 13:35:54 +0100 Subject: [PATCH] device choosing by brighness click added for gfw_dirk --- function/ground_floor_west.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/function/ground_floor_west.py b/function/ground_floor_west.py index 72baaf4..6fdccf9 100644 --- a/function/ground_floor_west.py +++ b/function/ground_floor_west.py @@ -128,6 +128,10 @@ class ground_floor_west_dirk(room_shelly_tradfri_light): # self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.device_chooser_action) self.powerplug_common.add_callback(None, None, self.device_chooser_action) + self.button_tradfri.add_callback(devices.tradfri_button.KEY_ACTION, + devices.tradfri_button.ACTION_BRIGHTNESS_UP, self.choose_next_device) + self.button_tradfri.add_callback(devices.tradfri_button.KEY_ACTION, + devices.tradfri_button.ACTION_BRIGHTNESS_DOWN, self.choose_prev_device) # self.powerplug_common.add_callback(self.KEY_POWERPLUG_AMPLIFIER, None, self.audio_source_selector) self.powerplug_common.add_callback(self.KEY_POWERPLUG_CD_PLAYER, None, self.audio_source_selector)