Procházet zdrojové kódy

tradfri dock added for gfw/dirk

master
Dirk Alders před 5 měsíci
rodič
revize
24297fae5f
2 změnil soubory, kde provedl 7 přidání a 7 odebrání
  1. 1
    1
      devdi
  2. 6
    6
      function/ground_floor_west.py

+ 1
- 1
devdi

@@ -1 +1 @@
1
-Subproject commit 2e66d0e27416739a8e5c1fa096490882f1b9643c
1
+Subproject commit fc1f86ab5aa532373f628a27fd181a4fe627e718

+ 6
- 6
function/ground_floor_west.py Zobrazit soubor

@@ -116,9 +116,9 @@ class ground_floor_west_dirk(room):
116 116
         # powerplug
117 117
         self.powerplug_common = pd.get(props.STG_MYA, loc, roo, props.FUN_MPP)
118 118
         self.KEY_POWERPLUG_AMPLIFIER = self.powerplug_common.KEY_OUTPUT_0
119
-        self.KEY_POWERPLUG_DESK_LIGHT = self.powerplug_common.KEY_OUTPUT_1
120 119
         self.KEY_POWERPLUG_CD_PLAYER = self.powerplug_common.KEY_OUTPUT_2
121
-        self.KEY_POWERPLUG_PC_DOCK = self.powerplug_common.KEY_OUTPUT_3
120
+        # dock
121
+        self.dock_tradfri = pd.get(props.STG_ZGW, loc, roo, props.FUN_DCK)
122 122
         # desk light
123 123
         self.desk_light_tradfri = pd.get(props.STG_ZGW, loc, roo, props.FUN_DEL)
124 124
         # button
@@ -137,14 +137,14 @@ class ground_floor_west_dirk(room):
137 137
         # Button - Brightness functionality
138 138
         self.brightness_functions = brightness_choose_n_action(self.button_tradfri)
139 139
         self.brightness_functions.add(self.main_light_tradfri, self.main_light_shelly, self.main_light_shelly.KEY_OUTPUT_0)
140
-        self.brightness_functions.add(self.desk_light_tradfri, self.powerplug_common, self.KEY_POWERPLUG_DESK_LIGHT)
140
+        self.brightness_functions.add(self.desk_light_tradfri, self.desk_light_tradfri, self.desk_light_tradfri.KEY_OUTPUT_0)
141 141
         self.brightness_functions.add(self.remote_amplifier, self.powerplug_common, self.KEY_POWERPLUG_AMPLIFIER)
142 142
         # Button - Main light
143 143
         self.button_tradfri.add_callback(self.button_tradfri.KEY_ACTION, self.button_tradfri.ACTION_TOGGLE,
144 144
                                          self.main_light_shelly.toggle_output_0_mcb)
145 145
         # Button - Desk light
146 146
         self.button_tradfri.add_callback(self.button_tradfri.KEY_ACTION, self.button_tradfri.ACTION_RIGHT,
147
-                                         self.powerplug_common.toggle_output_1_mcb)
147
+                                         self.desk_light_tradfri.toggle_output_0_mcb)
148 148
         # Button - Amplifier
149 149
         self.button_tradfri.add_callback(self.button_tradfri.KEY_ACTION, self.button_tradfri.ACTION_LEFT_LONG,
150 150
                                          self.powerplug_common.toggle_output_0_mcb)
@@ -153,7 +153,7 @@ class ground_floor_west_dirk(room):
153 153
                                          self.powerplug_common.toggle_output_2_mcb)
154 154
         # Button - PC dock
155 155
         self.button_tradfri.add_callback(self.button_tradfri.KEY_ACTION, self.button_tradfri.ACTION_LEFT,
156
-                                         self.powerplug_common.toggle_output_3_mcb)
156
+                                         self.dock_tradfri.toggle_output_0_mcb)
157 157
 
158 158
         # Mediaplayer - Amplifier auto on
159 159
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_CD_PLAYER, None, self.powerplug_common.set_output_0_mcb, True)
@@ -201,7 +201,7 @@ class ground_floor_west_dirk(room):
201 201
         )
202 202
         self.pc_dock_videv = videv_switching(
203 203
             mqtt_client, config.TOPIC_GFW_DIRK_PC_DOCK_VIDEV,
204
-            self.powerplug_common, self.KEY_POWERPLUG_PC_DOCK
204
+            self.dock_tradfri, self.dock_tradfri.KEY_OUTPUT_0
205 205
         )
206 206
         self.heating_function_videv = videv_heating(
207 207
             mqtt_client, config.TOPIC_GFW_DIRK_HEATING_VALVE_VIDEV,

Načítá se…
Zrušit
Uložit