Browse Source

Windowlights gfw/marion and ffw/sleep added

master
Dirk Alders 3 weeks ago
parent
commit
3e00f009f8
4 changed files with 27 additions and 1 deletions
  1. 1
    1
      devdi
  2. 12
    0
      function/first_floor_west.py
  3. 12
    0
      function/ground_floor_west.py
  4. 2
    0
      topics.py

+ 1
- 1
devdi

@@ -1 +1 @@
1
-Subproject commit 8f8ace13c131abf9c4dfb79087fa1c13c76805d2
1
+Subproject commit 118e80f070072d7ac65531bfdf316baf04901a9a

+ 12
- 0
function/first_floor_west.py View File

@@ -185,6 +185,8 @@ class first_floor_west_sleep(room):
185 185
         self.main_light_tradfri = pd.get(props.STG_ZFW, loc, roo, props.FUN_MAL)
186 186
         # heating function
187 187
         self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA)
188
+        # window light
189
+        self.window_light = pd.get(props.STG_ZFW, loc, roo, props.FUN_WIL)
188 190
         super().__init__(mqtt_client, pd, vd)
189 191
 
190 192
         #
@@ -198,6 +200,9 @@ class first_floor_west_sleep(room):
198 200
         )
199 201
         self.heating_function.add_callback(None, None, set_radiator_data, True)
200 202
 
203
+        # main light
204
+        self.main_light_shelly.add_callback(self.main_light_shelly.KEY_OUTPUT_0, None, self.window_light.set_output_0_mcb, True)
205
+
201 206
         #
202 207
         # Virtual Device Interface
203 208
         #
@@ -212,3 +217,10 @@ class first_floor_west_sleep(room):
212 217
             mqtt_client, config.TOPIC_FFW_SLEEP_HEATING_VALVE_VIDEV,
213 218
             self.heating_function
214 219
         )
220
+        # window lamp
221
+        self.windowlamp_videv = videv_switch_brightness_color_temp(
222
+            mqtt_client, config.TOPIC_FFW_SLEEP_WINDOW_LAMP_VIDEV,
223
+            self.window_light, self.window_light.KEY_OUTPUT_0,
224
+            self.window_light, self.window_light.KEY_BRIGHTNESS,
225
+            self.window_light, self.window_light.KEY_COLOR_TEMP
226
+        )

+ 12
- 0
function/ground_floor_west.py View File

@@ -68,6 +68,8 @@ class ground_floor_west_marion(room):
68 68
         self.main_light_shelly = pd.get(props.STG_SHE, loc, roo, props.FUN_MAL)
69 69
         # heating function
70 70
         self.heating_valve = pd.get(props.STG_ZGW, loc, roo, props.FUN_HEA)
71
+        # window light
72
+        self.window_light = pd.get(props.STG_ZGW, loc, roo, props.FUN_WIL)
71 73
         super().__init__(mqtt_client, pd, vd)
72 74
 
73 75
         #
@@ -81,6 +83,9 @@ class ground_floor_west_marion(room):
81 83
         )
82 84
         self.heating_function.add_callback(None, None, set_radiator_data, True)
83 85
 
86
+        # main light
87
+        self.main_light_shelly.add_callback(self.main_light_shelly.KEY_OUTPUT_0, None, self.window_light.set_output_0_mcb, True)
88
+
84 89
         #
85 90
         # Virtual Device Interface
86 91
         #
@@ -92,6 +97,13 @@ class ground_floor_west_marion(room):
92 97
             mqtt_client, config.TOPIC_GFW_MARION_HEATING_VALVE_VIDEV,
93 98
             self.heating_function
94 99
         )
100
+        # window lamp
101
+        self.windowlamp_videv = videv_switch_brightness_color_temp(
102
+            mqtt_client, config.TOPIC_GFW_MARION_WINDOW_LAMP_VIDEV,
103
+            self.window_light, self.window_light.KEY_OUTPUT_0,
104
+            self.window_light, self.window_light.KEY_BRIGHTNESS,
105
+            self.window_light, self.window_light.KEY_COLOR_TEMP
106
+        )
95 107
 
96 108
 
97 109
 class ground_floor_west_dirk(room):

+ 2
- 0
topics.py View File

@@ -12,6 +12,7 @@ TOPIC_GFW_FLOOR_MAIN_LIGHT_VIDEV = "videv/gfw/floor/main_light"
12 12
 # marion
13 13
 TOPIC_GFW_MARION_MAIN_LIGHT_VIDEV = "videv/gfw/marion/main_light"
14 14
 TOPIC_GFW_MARION_HEATING_VALVE_VIDEV = "videv/gfw/marion/heating_valve"
15
+TOPIC_GFW_MARION_WINDOW_LAMP_VIDEV = "videv/gfw/marion/window_light"
15 16
 
16 17
 # dirk
17 18
 TOPIC_GFW_DIRK_MAIN_LIGHT_VIDEV = "videv/gfw/dirk/main_light"
@@ -48,6 +49,7 @@ TOPIC_FFW_LIVINGROOM_HEATING_VALVE_VIDEV = "videv/ffw/livingroom/heating_valve"
48 49
 # sleep
49 50
 TOPIC_FFW_SLEEP_MAIN_LIGHT_VIDEV = "videv/ffw/sleep/main_light"
50 51
 TOPIC_FFW_SLEEP_HEATING_VALVE_VIDEV = "videv/ffw/sleep/heating_valve"
52
+TOPIC_FFW_SLEEP_WINDOW_LAMP_VIDEV = "videv/ffw/sleep/window_light"
51 53
 
52 54
 
53 55
 # first floor east

Loading…
Cancel
Save