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
-Subproject commit 8f8ace13c131abf9c4dfb79087fa1c13c76805d2
1
+Subproject commit 118e80f070072d7ac65531bfdf316baf04901a9a

+ 12
- 0
function/first_floor_west.py View File

185
         self.main_light_tradfri = pd.get(props.STG_ZFW, loc, roo, props.FUN_MAL)
185
         self.main_light_tradfri = pd.get(props.STG_ZFW, loc, roo, props.FUN_MAL)
186
         # heating function
186
         # heating function
187
         self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA)
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
         super().__init__(mqtt_client, pd, vd)
190
         super().__init__(mqtt_client, pd, vd)
189
 
191
 
190
         #
192
         #
198
         )
200
         )
199
         self.heating_function.add_callback(None, None, set_radiator_data, True)
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
         # Virtual Device Interface
207
         # Virtual Device Interface
203
         #
208
         #
212
             mqtt_client, config.TOPIC_FFW_SLEEP_HEATING_VALVE_VIDEV,
217
             mqtt_client, config.TOPIC_FFW_SLEEP_HEATING_VALVE_VIDEV,
213
             self.heating_function
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
         self.main_light_shelly = pd.get(props.STG_SHE, loc, roo, props.FUN_MAL)
68
         self.main_light_shelly = pd.get(props.STG_SHE, loc, roo, props.FUN_MAL)
69
         # heating function
69
         # heating function
70
         self.heating_valve = pd.get(props.STG_ZGW, loc, roo, props.FUN_HEA)
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
         super().__init__(mqtt_client, pd, vd)
73
         super().__init__(mqtt_client, pd, vd)
72
 
74
 
73
         #
75
         #
81
         )
83
         )
82
         self.heating_function.add_callback(None, None, set_radiator_data, True)
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
         # Virtual Device Interface
90
         # Virtual Device Interface
86
         #
91
         #
92
             mqtt_client, config.TOPIC_GFW_MARION_HEATING_VALVE_VIDEV,
97
             mqtt_client, config.TOPIC_GFW_MARION_HEATING_VALVE_VIDEV,
93
             self.heating_function
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
 class ground_floor_west_dirk(room):
109
 class ground_floor_west_dirk(room):

+ 2
- 0
topics.py View File

12
 # marion
12
 # marion
13
 TOPIC_GFW_MARION_MAIN_LIGHT_VIDEV = "videv/gfw/marion/main_light"
13
 TOPIC_GFW_MARION_MAIN_LIGHT_VIDEV = "videv/gfw/marion/main_light"
14
 TOPIC_GFW_MARION_HEATING_VALVE_VIDEV = "videv/gfw/marion/heating_valve"
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
 # dirk
17
 # dirk
17
 TOPIC_GFW_DIRK_MAIN_LIGHT_VIDEV = "videv/gfw/dirk/main_light"
18
 TOPIC_GFW_DIRK_MAIN_LIGHT_VIDEV = "videv/gfw/dirk/main_light"
48
 # sleep
49
 # sleep
49
 TOPIC_FFW_SLEEP_MAIN_LIGHT_VIDEV = "videv/ffw/sleep/main_light"
50
 TOPIC_FFW_SLEEP_MAIN_LIGHT_VIDEV = "videv/ffw/sleep/main_light"
50
 TOPIC_FFW_SLEEP_HEATING_VALVE_VIDEV = "videv/ffw/sleep/heating_valve"
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
 # first floor east
55
 # first floor east

Loading…
Cancel
Save