|
@@ -17,24 +17,25 @@ logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
|
17
|
17
|
class first_floor_east_floor(room_shelly_motion_sensor):
|
18
|
18
|
def __init__(self, mqtt_client):
|
19
|
19
|
# http://shelly1l-3C6105E4E629
|
20
|
|
- super().__init__(mqtt_client, "shellies/ffe/floor/main_light", "gui/ffe/floor/main_light/switch", "zigbee/ffe/floor/motion_sensor")
|
|
20
|
+ super().__init__(mqtt_client, config.TOPIC_FFE_FLOOR_MAIN_LIGHT_SHELLY,
|
|
21
|
+ config.TOPIC_FFE_FLOOR_MAIN_LIGHT_GUI_SWITCH, config.TOPIC_FFE_FLOOR_MAIN_LIGHT_MOTION_SENSOR)
|
21
|
22
|
|
22
|
23
|
|
23
|
24
|
class first_floor_east_kitchen(room_shelly):
|
24
|
25
|
def __init__(self, mqtt_client):
|
25
|
26
|
# http://shelly1l-8CAAB5616C01
|
26
|
|
- super().__init__(mqtt_client, "shellies/ffe/kitchen/main_light", "gui/ffe/kitchen/main_light/switch")
|
|
27
|
+ super().__init__(mqtt_client, config.TOPIC_FFE_KITCHEN_MAIN_LIGHT_SHELLY, config.TOPIC_FFE_KITCHEN_MAIN_LIGHT_GUI_SWITCH)
|
27
|
28
|
|
28
|
29
|
|
29
|
30
|
class first_floor_east_dining(room_shelly):
|
30
|
31
|
def __init__(self, mqtt_client):
|
31
|
32
|
# http://shelly1l-84CCA8ADD055
|
32
|
|
- super().__init__(mqtt_client, "shellies/ffe/diningroom/main_light", "gui/ffe/diningroom/main_light/switch")
|
33
|
|
- self.floorlamp_powerplug = devices.silvercrest_powerplug(mqtt_client, "zigbee/ffe/dinigroom/powerplug_floorlamp")
|
|
33
|
+ super().__init__(mqtt_client, config.TOPIC_FFE_DININGROOM_MAIN_LIGHT_SHELLY, config.TOPIC_FFE_DININGROOM_MAIN_LIGHT_GUI_SWITCH)
|
|
34
|
+ self.floorlamp_powerplug = devices.silvercrest_powerplug(mqtt_client, config.TOPIC_FFE_DININGROOM_FLOOR_LAMP_POWERPLUG)
|
34
|
35
|
if config.CHRISTMAS:
|
35
|
|
- self.garland_powerplug = devices.silvercrest_powerplug(mqtt_client, topic="zigbee/ffe/dinigroom/garland")
|
|
36
|
+ self.garland_powerplug = devices.silvercrest_powerplug(mqtt_client, config.TOPIC_FFE_DININGROOM_GARLAND_POWERPLUG)
|
36
|
37
|
#
|
37
|
|
- self.gui_switch_floorlamp = devices.nodered_gui_switch(mqtt_client, topic="gui/ffe/diningroom/floorlamp/switch")
|
|
38
|
+ self.gui_switch_floorlamp = devices.nodered_gui_switch(mqtt_client, config.TOPIC_FFE_DININGROOM_FLOOR_LAMP_GUI_SWITCH)
|
38
|
39
|
#
|
39
|
40
|
# Callback initialisation
|
40
|
41
|
#
|
|
@@ -52,17 +53,17 @@ class first_floor_east_dining(room_shelly):
|
52
|
53
|
class first_floor_east_sleep(room_shelly_tradfri_light):
|
53
|
54
|
def __init__(self, mqtt_client):
|
54
|
55
|
# http://shelly1l-E8DB84A254C7
|
55
|
|
- super().__init__(mqtt_client, "shellies/ffe/sleep/main_light", "gui/ffe/sleep/main_light/switch",
|
56
|
|
- "zigbee/ffe/sleep/main_light", "gui/ffe/sleep/main_light/br_ct")
|
|
56
|
+ super().__init__(mqtt_client, config.TOPIC_FFE_SLEEP_MAIN_LIGHT_SHELLY, config.TOPIC_FFE_SLEEP_MAIN_LIGHT_GUI_SWITCH,
|
|
57
|
+ config.TOPIC_FFE_SLEEP_MAIN_LIGHT_ZIGBEE, config.TOPIC_FFE_SLEEP_MAIN_LIGHT_GUI_BR_CT)
|
57
|
58
|
#
|
58
|
|
- self.bed_light_di_tradfri = devices.tradfri_light(mqtt_client, "zigbee/ffe/sleep/bed_light_di")
|
|
59
|
+ self.bed_light_di_tradfri = devices.tradfri_light(mqtt_client, config.TOPIC_FFE_SLEEP_BED_LIGHT_DI_ZIGBEE)
|
59
|
60
|
#
|
60
|
|
- self.gui_switch_bed_light_di = devices.nodered_gui_switch(mqtt_client, "gui/ffe/sleep/bed_light_di/switch")
|
61
|
|
- self.gui_br_ct_bed_light_di = devices.nodered_gui_brightness_color_temp(mqtt_client, "gui/ffe/sleep/bed_light_di/br_ct")
|
|
61
|
+ self.gui_switch_bed_light_di = devices.nodered_gui_switch(mqtt_client, config.TOPIC_FFE_SLEEP_BED_LIGHT_DI_GUI_SWITCH)
|
|
62
|
+ self.gui_br_ct_bed_light_di = devices.nodered_gui_brightness_color_temp(mqtt_client, config.TOPIC_FFE_SLEEP_BED_LIGHT_DI_GUI_BR_CT)
|
62
|
63
|
#
|
63
|
|
- self.button_tradfri = devices.tradfri_button(mqtt_client, "zigbee/ffe/sleep/input_device")
|
|
64
|
+ self.button_tradfri = devices.tradfri_button(mqtt_client, config.TOPIC_FFE_SLEEP_INPUT_DEVICE)
|
64
|
65
|
#
|
65
|
|
- self.brightness_functions = brightness_choose_n_action(mqtt_client, self.button_tradfri, "gui/ffe/sleep/active_device_state/led")
|
|
66
|
+ self.brightness_functions = brightness_choose_n_action(mqtt_client, self.button_tradfri, config.TOPIC_FFE_SLEEP_DEVICE_CHOOSER_LED)
|
66
|
67
|
self.brightness_functions.add(self.main_light_tradfri, self.main_light_shelly.add_on_off_callback_0)
|
67
|
68
|
self.brightness_functions.add(self.bed_light_di_tradfri, self.bed_light_di_tradfri.add_on_off_callback_0)
|
68
|
69
|
#
|
|
@@ -93,20 +94,20 @@ class first_floor_east_sleep(room_shelly_tradfri_light):
|
93
|
94
|
class first_floor_east_living(room_shelly_tradfri_light):
|
94
|
95
|
def __init__(self, mqtt_client):
|
95
|
96
|
# http://shelly1l-3C6105E3F910
|
96
|
|
- super().__init__(mqtt_client, "shellies/ffe/livingroom/main_light", "gui/ffe/livingroom/main_light/switch",
|
97
|
|
- "zigbee/ffe/livingroom/main_light", "gui/ffe/livingroom/main_light/br_ct")
|
|
97
|
+ super().__init__(mqtt_client, config.TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_SHELLY, config.TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_GUI_SWITCH,
|
|
98
|
+ config.TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_ZIGBEE, config.TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_GUI_BR_CT)
|
98
|
99
|
for i in range(1, 7):
|
99
|
|
- setattr(self, 'floorlamp_tradfri_%d' % i, devices.tradfri_light(mqtt_client, "zigbee/ffe/livingroom/floorlamp_%d" % i))
|
|
100
|
+ setattr(self, 'floorlamp_tradfri_%d' % i, devices.tradfri_light(mqtt_client, config.TOPIC_FFE_LIVINGROOM_FLOOR_LAMP_ZIGBEE % i))
|
100
|
101
|
#
|
101
|
102
|
if config.CHRISTMAS:
|
102
|
|
- self.powerplug_xmas_tree = devices.silvercrest_powerplug(mqtt_client, "zigbee/ffe/livingroom/powerplug_xmas-tree")
|
103
|
|
- self.powerplug_xmas_star = devices.silvercrest_powerplug(mqtt_client, "zigbee/ffe/livingroom/powerplug_xmas-star")
|
|
103
|
+ self.powerplug_xmas_tree = devices.silvercrest_powerplug(mqtt_client, config.TOPIC_FFE_LIVINGROOM_XMAS_TREE_POWERPLUG)
|
|
104
|
+ self.powerplug_xmas_star = devices.silvercrest_powerplug(mqtt_client, config.TOPIC_FFE_LIVINGROOM_XMAS_STAR_POWERPLUG)
|
104
|
105
|
#
|
105
|
|
- self.gui_switch_floorlamp = devices.nodered_gui_switch(mqtt_client, "gui/ffe/livingroom/floorlamp/switch")
|
106
|
|
- self.gui_br_ct_floorlamp = devices.nodered_gui_brightness_color_temp(mqtt_client, "gui/ffe/livingroom/floorlamp/br_ct")
|
|
106
|
+ self.gui_switch_floorlamp = devices.nodered_gui_switch(mqtt_client, config.TOPIC_FFE_LIVINGROOM_FLOOR_LAMP_GUI_SWITCH)
|
|
107
|
+ self.gui_br_ct_floorlamp = devices.nodered_gui_brightness_color_temp(mqtt_client, config.TOPIC_FFE_LIVINGROOM_FLOOR_LAMP_GUI_BR_CT)
|
107
|
108
|
#
|
108
|
109
|
if config.CHRISTMAS:
|
109
|
|
- self.gui_switch_xmas_tree = devices.nodered_gui_switch(mqtt_client, "gui/ffe/livingroom/xmas_tree/switch")
|
|
110
|
+ self.gui_switch_xmas_tree = devices.nodered_gui_switch(mqtt_client, config.TOPIC_FFE_LIVINGROOM_XMAS_TREE_GUI_SWITCH)
|
110
|
111
|
#
|
111
|
112
|
# Callback initialisation
|
112
|
113
|
#
|