|
@@ -1,10 +1,10 @@
|
1
|
1
|
#!/usr/bin/env python
|
2
|
2
|
# -*- coding: utf-8 -*-
|
3
|
3
|
#
|
4
|
|
-import config
|
5
|
4
|
import devices
|
6
|
|
-import inspect
|
7
|
|
-import logging
|
|
5
|
+from function.ground_floor_west import ground_floor_west_floor, ground_floor_west_marion, ground_floor_west_dirk
|
|
6
|
+from function.first_floor_west import first_floor_west_julian, first_floor_west_living
|
|
7
|
+from function.first_floor_east import first_floor_east_floor, first_floor_east_kitchen, first_floor_east_dining, first_floor_east_sleep_madi, first_floor_east_living
|
8
|
8
|
|
9
|
9
|
# TODO: implement bed light dirk fading by input device
|
10
|
10
|
# TODO: implement heating function sleep_madi
|
|
@@ -14,12 +14,6 @@ import logging
|
14
|
14
|
# TODO: implement existing nodered functionality "dirk" (ground floor west)
|
15
|
15
|
# TODO: implement warning message (incl. fixing all_functions.devicelist
|
16
|
16
|
|
17
|
|
-try:
|
18
|
|
- from config import APP_NAME as ROOT_LOGGER_NAME
|
19
|
|
-except ImportError:
|
20
|
|
- ROOT_LOGGER_NAME = 'root'
|
21
|
|
-logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
|
22
|
|
-
|
23
|
17
|
|
24
|
18
|
class all_functions(object):
|
25
|
19
|
def __init__(self, mqtt_client):
|
|
@@ -67,329 +61,3 @@ class all_functions(object):
|
67
|
61
|
if type(obj) in devices.DEVICE_TYPE_LIST():
|
68
|
62
|
self.__devices__.append(obj)
|
69
|
63
|
return self.__devices__
|
70
|
|
-
|
71
|
|
-
|
72
|
|
-class room(object):
|
73
|
|
- def gui_switch_feedback(self, device, key, data):
|
74
|
|
- self.gui_switch_main_light.set_feedback(data)
|
75
|
|
-
|
76
|
|
-
|
77
|
|
-class room_shelly(room):
|
78
|
|
- def __init__(self, mqtt_client, topic_shelly, topic_gui_switch):
|
79
|
|
- self.main_light_shelly = devices.shelly(mqtt_client, topic=topic_shelly)
|
80
|
|
- #
|
81
|
|
- self.gui_switch_main_light = devices.nodered_gui(mqtt_client, topic=topic_gui_switch)
|
82
|
|
- #
|
83
|
|
- # Callback initialisation
|
84
|
|
- #
|
85
|
|
- self.gui_switch_main_light.add_callback(devices.nodered_gui.KEY_STATE, None, self.gui_switch_command)
|
86
|
|
- self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.gui_switch_feedback)
|
87
|
|
-
|
88
|
|
- def all_off(self):
|
89
|
|
- self.main_light_shelly.set_output_0(False)
|
90
|
|
- self.main_light_shelly.set_output_1(False)
|
91
|
|
-
|
92
|
|
- def gui_switch_command(self, device, key, data):
|
93
|
|
- logger.info("Switching \"%s\" main light: %s", type(self).__name__, str(data))
|
94
|
|
- self.main_light_shelly.set_output_0(data)
|
95
|
|
-
|
96
|
|
-
|
97
|
|
-class room_shelly_tradfri_light(room_shelly):
|
98
|
|
- def __init__(self, mqtt_client, topic_shelly, topic_gui_switch, topic_tradfri_light, topic_gui_brightness, topic_gui_color_temp):
|
99
|
|
- super().__init__(mqtt_client, topic_shelly, topic_gui_switch)
|
100
|
|
- self.main_light_tradfri = devices.tradfri_light(mqtt_client, topic=topic_tradfri_light)
|
101
|
|
- #
|
102
|
|
- self.gui_brightness_main_light = devices.nodered_gui(mqtt_client, topic=topic_gui_brightness)
|
103
|
|
- self.gui_brightness_main_light.enable(False)
|
104
|
|
- self.gui_brightness_main_light.set_feedback(0)
|
105
|
|
- self.gui_color_temp_main_light = devices.nodered_gui(mqtt_client, topic=topic_gui_color_temp)
|
106
|
|
- self.gui_color_temp_main_light.enable(False)
|
107
|
|
- self.gui_color_temp_main_light.set_feedback(0)
|
108
|
|
- #
|
109
|
|
- # Callback initialisation
|
110
|
|
- #
|
111
|
|
- self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.enable_brightness_n_colortemp)
|
112
|
|
- self.main_light_tradfri.add_callback(
|
113
|
|
- devices.tradfri_light.KEY_BRIGHTNESS, None, self.set_gui_brightness_main_light)
|
114
|
|
- self.main_light_tradfri.add_callback(
|
115
|
|
- devices.tradfri_light.KEY_COLOR_TEMP, None, self.set_gui_color_temp_main_light)
|
116
|
|
- self.gui_brightness_main_light.add_callback(
|
117
|
|
- devices.nodered_gui.KEY_BRIGHTNESS, None, self.set_brightness_main_light)
|
118
|
|
- self.gui_color_temp_main_light.add_callback(
|
119
|
|
- devices.nodered_gui.KEY_COLOR_TEMP, None, self.set_color_temp_main_light)
|
120
|
|
-
|
121
|
|
- def enable_brightness_n_colortemp(self, devive, key, data):
|
122
|
|
- self.gui_brightness_main_light.enable(data)
|
123
|
|
- self.gui_color_temp_main_light.enable(data)
|
124
|
|
- if data is False:
|
125
|
|
- self.gui_brightness_main_light.set_feedback(0)
|
126
|
|
- self.gui_color_temp_main_light.set_feedback(0)
|
127
|
|
- else:
|
128
|
|
- self.gui_brightness_main_light.set_feedback(self.main_light_tradfri.brightness)
|
129
|
|
- self.gui_color_temp_main_light.set_feedback(self.main_light_tradfri.color_temp / 10)
|
130
|
|
-
|
131
|
|
- def set_gui_brightness_main_light(self, device, key, data):
|
132
|
|
- self.gui_brightness_main_light.set_feedback(data)
|
133
|
|
-
|
134
|
|
- def set_gui_color_temp_main_light(self, device, key, data):
|
135
|
|
- self.gui_color_temp_main_light.set_feedback(data / 10)
|
136
|
|
-
|
137
|
|
- def set_brightness_main_light(self, device, key, data):
|
138
|
|
- logger.info("Setting brightness \"%s\" main light: %.1f", type(self).__name__, data)
|
139
|
|
- self.main_light_tradfri.set_brightness(data)
|
140
|
|
-
|
141
|
|
- def set_color_temp_main_light(self, device, key, data):
|
142
|
|
- logger.info("Setting color_temp \"%s\" main light: %.1f", type(self).__name__, data)
|
143
|
|
- self.main_light_tradfri.set_color_temp(data * 10)
|
144
|
|
-
|
145
|
|
-
|
146
|
|
-class room_shelly_silvercrest_light(room_shelly_tradfri_light):
|
147
|
|
- def __init__(self, mqtt_client, topic_shelly, topic_gui_switch, topic_tradfri_light, topic_gui_brightness, topic_gui_color_temp):
|
148
|
|
- super().__init__(mqtt_client, topic_shelly, topic_gui_switch, topic_tradfri_light, topic_gui_brightness, topic_gui_color_temp)
|
149
|
|
- #
|
150
|
|
- # Callback initialisation
|
151
|
|
- #
|
152
|
|
- self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.get_initial_main_light_data)
|
153
|
|
- #
|
154
|
|
- self.main_light_shelly_last = None
|
155
|
|
-
|
156
|
|
- def get_initial_main_light_data(self, device, key, data):
|
157
|
|
- if data is True and self.main_light_shelly_last is not True:
|
158
|
|
- self.send_init_message_main_light()
|
159
|
|
- self.main_light_shelly_last = data
|
160
|
|
-
|
161
|
|
- def send_init_message_main_light(self):
|
162
|
|
- self.main_light_tradfri.mqtt_client.send(self.main_light_tradfri.topic + "/get", '{"state": ""}')
|
163
|
|
-
|
164
|
|
-
|
165
|
|
-class ground_floor_west_floor(room_shelly_silvercrest_light):
|
166
|
|
- # https://shelly1l-84CCA8AD1148
|
167
|
|
- def __init__(self, mqtt_client):
|
168
|
|
- super().__init__(mqtt_client, "shellies/floor_eg_w", "gui/gfw_sw_floor",
|
169
|
|
- "zigbee_eg_w/light/floor_eg_w/a", "gui/gfw_br_floor", "gui/gfw_ct_floor")
|
170
|
|
- #
|
171
|
|
- # Callback initialisation
|
172
|
|
- #
|
173
|
|
- self.main_light_tradfri_2 = devices.tradfri_light(mqtt_client, "zigbee_eg_w/light/floor_eg_w/b")
|
174
|
|
- self.main_light_tradfri.add_callback(devices.tradfri_light.KEY_BRIGHTNESS,
|
175
|
|
- None, self.sync_brightness_main_light)
|
176
|
|
- self.main_light_tradfri.add_callback(devices.tradfri_light.KEY_COLOR_TEMP,
|
177
|
|
- None, self.sync_color_temp_main_light)
|
178
|
|
-
|
179
|
|
- def send_init_message_main_light(self):
|
180
|
|
- return super().send_init_message_main_light()
|
181
|
|
- self.main_light_tradfri_2.mqtt_client.send(self.main_light_tradfri_2.topic + "/get", '{"state": ""}')
|
182
|
|
-
|
183
|
|
- def sync_brightness_main_light(self, device, key, data):
|
184
|
|
- self.main_light_tradfri_2.set_brightness(data)
|
185
|
|
-
|
186
|
|
- def sync_color_temp_main_light(self, device, key, data):
|
187
|
|
- self.main_light_tradfri_2.set_color_temp(data)
|
188
|
|
-
|
189
|
|
-
|
190
|
|
-class ground_floor_west_marion(room_shelly):
|
191
|
|
- # https://shelly1l-E8DB84A1E067
|
192
|
|
- def __init__(self, mqtt_client):
|
193
|
|
- super().__init__(mqtt_client, "shellies/marion", "gui/gfw_sw_marion")
|
194
|
|
-
|
195
|
|
-
|
196
|
|
-class ground_floor_west_dirk(room_shelly_tradfri_light):
|
197
|
|
- # https://shelly1l-3C6105E44F27
|
198
|
|
- def __init__(self, mqtt_client):
|
199
|
|
- super().__init__(mqtt_client, "shellies/dirk", "gui/gfw_sw_dirk",
|
200
|
|
- "zigbee_eg_w/light/dirk", "gui/gfw_br_dirk", "gui/gfw_ct_dirk")
|
201
|
|
-
|
202
|
|
-
|
203
|
|
-class first_floor_west_julian(room_shelly_tradfri_light):
|
204
|
|
- # http://shelly1l-3C6105E43452
|
205
|
|
- def __init__(self, mqtt_client):
|
206
|
|
- super().__init__(mqtt_client, "shellies/julian", "gui/ffw_sw_julian",
|
207
|
|
- "zigbee_og_e/light/julian", "gui/ffw_br_julian", "gui/ffw_ct_julian")
|
208
|
|
-
|
209
|
|
-
|
210
|
|
-class first_floor_west_living(room_shelly):
|
211
|
|
- # http://shelly1l-84CCA8ACE6A1
|
212
|
|
- def __init__(self, mqtt_client):
|
213
|
|
- super().__init__(mqtt_client, "shellies/living_mika", "gui/ffw_sw_living")
|
214
|
|
-
|
215
|
|
-
|
216
|
|
-class first_floor_east_floor(room_shelly):
|
217
|
|
- def __init__(self, mqtt_client):
|
218
|
|
- # http://shelly1l-3C6105E4E629
|
219
|
|
- super().__init__(mqtt_client, "shellies/floor_madi", "gui/ffe_sw_floor")
|
220
|
|
-
|
221
|
|
- def toggle_main_light(self, device, key, data):
|
222
|
|
- logger.info("Toggeling \"%s\" main light", type(self).__name__)
|
223
|
|
- self.main_light_shelly.set_output_0("toggle")
|
224
|
|
-
|
225
|
|
-
|
226
|
|
-class first_floor_east_kitchen(room_shelly):
|
227
|
|
- # TODO: add circulation pump (switch, time)
|
228
|
|
- def __init__(self, mqtt_client):
|
229
|
|
- # http://shelly1l-8CAAB5616C01
|
230
|
|
- super().__init__(mqtt_client, "shellies/kitchen", "gui/ffe_sw_kitchen")
|
231
|
|
-
|
232
|
|
-
|
233
|
|
-class first_floor_east_dining(room_shelly):
|
234
|
|
- def __init__(self, mqtt_client):
|
235
|
|
- # http://shelly1l-84CCA8ADD055
|
236
|
|
- super().__init__(mqtt_client, "shellies/diningroom", "gui/ffe_sw_diningroom")
|
237
|
|
- self.floorlamp_powerplug = devices.silvercrest_powerplug(mqtt_client, "zigbee_og_e/powerplug/dining_floorlamp")
|
238
|
|
- if config.CHRISTMAS:
|
239
|
|
- self.garland_powerplug = devices.silvercrest_powerplug(mqtt_client, topic="zigbee_og_e/powerplug/aux")
|
240
|
|
- #
|
241
|
|
- self.gui_switch_floorlamp = devices.nodered_gui(mqtt_client, topic="gui/ffe_sw_dining_floorlamp")
|
242
|
|
- #
|
243
|
|
- # Callback initialisation
|
244
|
|
- #
|
245
|
|
- self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.floorlamp_synchronisation)
|
246
|
|
- self.gui_switch_floorlamp.add_callback(devices.nodered_gui.KEY_STATE, None, self.gui_switch_command_floorlamp)
|
247
|
|
- self.floorlamp_powerplug.add_callback(devices.silvercrest_powerplug.KEY_OUTPUT_0,
|
248
|
|
- None, self.gui_switch_feedback_floorlamp)
|
249
|
|
- #
|
250
|
|
- self.main_light_shelly_last = None
|
251
|
|
-
|
252
|
|
- def floorlamp_synchronisation(self, device, key, data):
|
253
|
|
- if data != self.main_light_shelly_last:
|
254
|
|
- logger.info("Synching \"%s\" floorlamp with main light (%s)", type(self).__name__, str(data))
|
255
|
|
- self.floorlamp_powerplug.set_output_0(data)
|
256
|
|
- self.main_light_shelly_last = data
|
257
|
|
-
|
258
|
|
- def gui_switch_command_floorlamp(self, device, key, data):
|
259
|
|
- logger.info("Switching \"%s\" floorlamp: %s", type(self).__name__, str(data))
|
260
|
|
- self.floorlamp_powerplug.set_output_0(data)
|
261
|
|
-
|
262
|
|
- def gui_switch_feedback_floorlamp(self, device, key, data):
|
263
|
|
- self.gui_switch_floorlamp.set_feedback(data)
|
264
|
|
-
|
265
|
|
-
|
266
|
|
-class first_floor_east_sleep_madi(room_shelly_tradfri_light):
|
267
|
|
- def __init__(self, mqtt_client):
|
268
|
|
- # http://shelly1l-E8DB84A254C7
|
269
|
|
- super().__init__(mqtt_client, "shellies/sleep_madi", "gui/ffe_sw_sleep_madi",
|
270
|
|
- "zigbee_og_e/light/sleep_madi", "gui/ffe_br_sleep_madi", "gui/ffe_ct_sleep_madi")
|
271
|
|
- #
|
272
|
|
- self.bed_light_di_tradfri = devices.tradfri_light(mqtt_client, topic="zigbee_og_e/light/sleep_bed_di")
|
273
|
|
- #
|
274
|
|
- self.gui_switch_bed_light_di = devices.nodered_gui(mqtt_client, "gui/ffe_sw_bed_light_di")
|
275
|
|
- self.gui_brightness_bed_light_di = devices.nodered_gui(mqtt_client, "gui/ffe_br_bed_light_di")
|
276
|
|
- self.gui_brightness_bed_light_di.enable(False)
|
277
|
|
- self.gui_brightness_bed_light_di.set_feedback(0)
|
278
|
|
- #
|
279
|
|
- # Callback initialisation
|
280
|
|
- #
|
281
|
|
- self.gui_switch_bed_light_di.add_callback(
|
282
|
|
- devices.nodered_gui.KEY_STATE, None, self.gui_switch_command_bed_light_di)
|
283
|
|
- self.bed_light_di_tradfri.add_callback(
|
284
|
|
- devices.tradfri_light.KEY_OUTPUT_0, None, self.gui_switch_feedback_bed_light_di)
|
285
|
|
- self.bed_light_di_tradfri.add_callback(
|
286
|
|
- devices.tradfri_light.KEY_BRIGHTNESS, None, self.set_gui_brightness_bed_light_di)
|
287
|
|
- self.gui_brightness_bed_light_di.add_callback(
|
288
|
|
- devices.nodered_gui.KEY_BRIGHTNESS, None, self.set_brightness_bed_light_di)
|
289
|
|
-
|
290
|
|
- def toggle_main_light(self, device, key, data):
|
291
|
|
- logger.info("Toggeling \"%s\" main light", type(self).__name__)
|
292
|
|
- self.main_light_shelly.set_output_0("toggle")
|
293
|
|
-
|
294
|
|
- def gui_switch_command_bed_light_di(self, device, key, data):
|
295
|
|
- logger.info("Switching \"%s\" bed light dirk: %s", type(self).__name__, str(data))
|
296
|
|
- self.bed_light_di_tradfri.set_output_0(data)
|
297
|
|
-
|
298
|
|
- def gui_switch_feedback_bed_light_di(self, device, key, data):
|
299
|
|
- self.gui_switch_bed_light_di.set_feedback(data)
|
300
|
|
- self.gui_brightness_bed_light_di.enable(data)
|
301
|
|
- if data is False:
|
302
|
|
- self.gui_brightness_bed_light_di.set_feedback(0)
|
303
|
|
- else:
|
304
|
|
- self.gui_brightness_bed_light_di.set_feedback(self.bed_light_di_tradfri.brightness)
|
305
|
|
-
|
306
|
|
- def set_gui_brightness_bed_light_di(self, device, key, data):
|
307
|
|
- self.gui_brightness_bed_light_di.set_feedback(data)
|
308
|
|
-
|
309
|
|
- def set_brightness_bed_light_di(self, device, key, data):
|
310
|
|
- logger.info("Setting brightness \"%s\" bed light dirk: %.1f", type(self).__name__, data)
|
311
|
|
- self.bed_light_di_tradfri.set_brightness(data)
|
312
|
|
-
|
313
|
|
- def toggle_bed_light_di(self, device, key, data):
|
314
|
|
- logger.info("Toggeling \"%s\" bed light dirk", type(self).__name__)
|
315
|
|
- self.bed_light_di_tradfri.set_output_0("toggle")
|
316
|
|
-
|
317
|
|
-
|
318
|
|
-class first_floor_east_living(room_shelly_tradfri_light):
|
319
|
|
- def __init__(self, mqtt_client):
|
320
|
|
- # http://shelly1l-3C6105E3F910
|
321
|
|
- super().__init__(mqtt_client, "shellies/livingroom", "gui/ffe_sw_livingroom",
|
322
|
|
- "zigbee_og_e/light/livingroom", "gui/ffe_br_livingroom", "gui/ffe_ct_livingroom")
|
323
|
|
- for i in range(1, 7):
|
324
|
|
- setattr(self, 'floorlamp_tradfri_%d' % i,
|
325
|
|
- devices.tradfri_light(mqtt_client, topic="zigbee_og_e/light/living_floorlamp_%d" % i))
|
326
|
|
- #
|
327
|
|
- self.gui_switch_floorlamp = devices.nodered_gui(mqtt_client, topic="gui/ffe_sw_living_floorlamp")
|
328
|
|
- self.gui_brightness_floorlamp = devices.nodered_gui(mqtt_client, "gui/ffe_br_livingroom_floorlamp")
|
329
|
|
- self.gui_brightness_floorlamp.enable(False)
|
330
|
|
- self.gui_brightness_floorlamp.set_feedback(0)
|
331
|
|
- self.gui_color_temp_floorlamp = devices.nodered_gui(mqtt_client, "gui/ffe_ct_livingroom_floorlamp")
|
332
|
|
- self.gui_color_temp_floorlamp.enable(False)
|
333
|
|
- self.gui_color_temp_floorlamp.set_feedback(0)
|
334
|
|
- #
|
335
|
|
- # Callback initialisation
|
336
|
|
- #
|
337
|
|
- self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.floorlamp_synchronisation)
|
338
|
|
- self.gui_switch_floorlamp.add_callback(devices.nodered_gui.KEY_STATE, None, self.gui_switch_command_floorlamp)
|
339
|
|
- self.floorlamp_tradfri_1.add_callback(
|
340
|
|
- devices.tradfri_light.KEY_OUTPUT_0, None, self.gui_switch_feedback_floorlamp)
|
341
|
|
- self.floorlamp_tradfri_1.add_callback(
|
342
|
|
- devices.tradfri_light.KEY_BRIGHTNESS, None, self.set_gui_brightness_floorlamp)
|
343
|
|
- self.floorlamp_tradfri_1.add_callback(
|
344
|
|
- devices.tradfri_light.KEY_COLOR_TEMP, None, self.set_gui_color_temp_floorlamp)
|
345
|
|
- self.gui_brightness_floorlamp.add_callback(
|
346
|
|
- devices.nodered_gui.KEY_BRIGHTNESS, None, self.set_brightness_floorlamp)
|
347
|
|
- self.gui_color_temp_floorlamp.add_callback(
|
348
|
|
- devices.nodered_gui.KEY_COLOR_TEMP, None, self.set_color_temp_floorlamp)
|
349
|
|
- #
|
350
|
|
- self.main_light_shelly_last = None
|
351
|
|
-
|
352
|
|
- def __floorlamp_devices__(self):
|
353
|
|
- rv = []
|
354
|
|
- for i in range(1, 7):
|
355
|
|
- rv.append(getattr(self, 'floorlamp_tradfri_%d' % i))
|
356
|
|
- return rv
|
357
|
|
-
|
358
|
|
- def floorlamp_synchronisation(self, device, key, data):
|
359
|
|
- if data != self.main_light_shelly_last:
|
360
|
|
- logger.info("Synching \"%s\" floorlamp with main light (%s)", type(self).__name__, str(data))
|
361
|
|
- for device in self.__floorlamp_devices__():
|
362
|
|
- device.set_output_0(data)
|
363
|
|
- self.main_light_shelly_last = data
|
364
|
|
-
|
365
|
|
- def gui_switch_command_floorlamp(self, device, key, data):
|
366
|
|
- logger.info("Switching \"%s\" floorlamp: %s", type(self).__name__, str(data))
|
367
|
|
- for device in self.__floorlamp_devices__():
|
368
|
|
- device.set_output_0(data)
|
369
|
|
-
|
370
|
|
- def gui_switch_feedback_floorlamp(self, device, key, data):
|
371
|
|
- self.gui_switch_floorlamp.set_feedback(data)
|
372
|
|
- self.gui_brightness_floorlamp.enable(data)
|
373
|
|
- self.gui_color_temp_floorlamp.enable(data)
|
374
|
|
- if data is False:
|
375
|
|
- self.gui_brightness_floorlamp.set_feedback(0)
|
376
|
|
- self.gui_color_temp_floorlamp.set_feedback(0)
|
377
|
|
- else:
|
378
|
|
- self.gui_brightness_floorlamp.set_feedback(self.floorlamp_tradfri_1.brightness)
|
379
|
|
- self.gui_color_temp_floorlamp.set_feedback(self.floorlamp_tradfri_1.color_temp / 10)
|
380
|
|
-
|
381
|
|
- def set_gui_brightness_floorlamp(self, device, key, data):
|
382
|
|
- self.gui_brightness_floorlamp.set_feedback(data)
|
383
|
|
-
|
384
|
|
- def set_gui_color_temp_floorlamp(self, device, key, data):
|
385
|
|
- self.gui_color_temp_floorlamp.set_feedback(data / 10)
|
386
|
|
-
|
387
|
|
- def set_brightness_floorlamp(self, device, key, data):
|
388
|
|
- logger.info("Setting brightness \"%s\" floorlamp: %.1f", type(self).__name__, data)
|
389
|
|
- for device in self.__floorlamp_devices__():
|
390
|
|
- device.set_brightness(data)
|
391
|
|
-
|
392
|
|
- def set_color_temp_floorlamp(self, device, key, data):
|
393
|
|
- logger.info("Setting color_temp \"%s\" floorlamp: %.1f", type(self).__name__, data)
|
394
|
|
- for device in self.__floorlamp_devices__():
|
395
|
|
- device.set_color_temp(data * 10)
|