From 1080d97d0838f29fd0317e05624245074da5f298 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Mon, 19 Dec 2022 16:57:59 +0100 Subject: [PATCH] gui_switch topics optimized --- function/__init__.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/function/__init__.py b/function/__init__.py index 76d45bb..f44fd53 100644 --- a/function/__init__.py +++ b/function/__init__.py @@ -14,6 +14,8 @@ logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__) # TODO: Add brightness and color temp including disable of gui elements. # TODO: Add lamp sleep_di +# TODO: Add input_device functions +# TODO: Clean-Up Node-Red class room(object): @@ -44,25 +46,25 @@ class room_shelly(room): class first_floor_east_floor(room_shelly): def __init__(self, mqtt_client): # http://shelly1l-3C6105E4E629 - super().__init__(mqtt_client, "shellies/floor_madi", "gui/ffe_floor") + super().__init__(mqtt_client, "shellies/floor_madi", "gui/ffe_sw_floor") class first_floor_east_kitchen(room_shelly): # TODO: add circulation pump (switch, time) def __init__(self, mqtt_client): # http://shelly1l-8CAAB5616C01 - super().__init__(mqtt_client, "shellies/kitchen", "gui/ffe_kitchen") + super().__init__(mqtt_client, "shellies/kitchen", "gui/ffe_sw_kitchen") class first_floor_east_dining(room_shelly): def __init__(self, mqtt_client): # http://shelly1l-84CCA8ADD055 - super().__init__(mqtt_client, "shellies/diningroom", "gui/ffe_diningroom") + super().__init__(mqtt_client, "shellies/diningroom", "gui/ffe_sw_diningroom") self.floorlamp_powerplug = devices.silvercrest_powerplug(mqtt_client, "zigbee_og_e/powerplug/dining_floorlamp") if config.CHRISTMAS: self.garland_powerplug = devices.silvercrest_powerplug(mqtt_client, topic="zigbee_og_e/powerplug/aux") # - self.gui_switch_floorlamp = devices.nodered_gui(mqtt_client, topic="gui/ffe_dining_floorlamp") + self.gui_switch_floorlamp = devices.nodered_gui(mqtt_client, topic="gui/ffe_sw_dining_floorlamp") # # Callback initialisation # @@ -90,7 +92,7 @@ class first_floor_east_dining(room_shelly): class first_floor_east_sleep_madi(room_shelly): def __init__(self, mqtt_client): # http://shelly1l-E8DB84A254C7 - super().__init__(mqtt_client, "shellies/sleep_madi", "gui/ffe_sleep_madi") + super().__init__(mqtt_client, "shellies/sleep_madi", "gui/ffe_sw_sleep_madi") self.main_light_tradfri = devices.tradfri_light(mqtt_client, topic="zigbee_og_e/light/sleep_madi") self.bed_light_di_tradfri = devices.tradfri_light(mqtt_client, topic="zigbee_og_e/light/sleep_bed_di") self.button_tradfri = devices.tradfri_button(mqtt_client, topic="zigbee_og_e/input_device/og_east") @@ -99,13 +101,13 @@ class first_floor_east_sleep_madi(room_shelly): class first_floor_east_living(room_shelly): def __init__(self, mqtt_client): # http://shelly1l-3C6105E3F910 - super().__init__(mqtt_client, "shellies/livingroom", "gui/ffe_livingroom") + super().__init__(mqtt_client, "shellies/livingroom", "gui/ffe_sw_livingroom") self.main_light_tradfri = devices.tradfri_light(mqtt_client, topic="zigbee_og_e/light/livingroom") for i in range(1, 7): setattr(self, 'floorlamp_tradfri_%d' % i, devices.tradfri_light(mqtt_client, topic="zigbee_og_e/light/living_floorlamp_%d" % i)) # - self.gui_switch_floorlamp = devices.nodered_gui(mqtt_client, topic="gui/ffe_living_floorlamp") + self.gui_switch_floorlamp = devices.nodered_gui(mqtt_client, topic="gui/ffe_sw_living_floorlamp") # # Callback initialisation #