Przeglądaj źródła

Added wifi garden and wardrobe light sleep ffe

master
Dirk Alders 3 miesięcy temu
rodzic
commit
248e9432d1
6 zmienionych plików z 23 dodań i 4 usunięć
  1. 1
    1
      .vscode/launch.json
  2. 1
    1
      devdi
  3. 1
    0
      devices/__init__.py
  4. 7
    0
      function/first_floor_east.py
  5. 9
    0
      function/garden.py
  6. 4
    2
      topics.py

+ 1
- 1
.vscode/launch.json Wyświetl plik

@@ -6,7 +6,7 @@
6 6
     "configurations": [
7 7
         {
8 8
             "name": "Python: Main File execution",
9
-            "type": "python",
9
+            "type": "debugpy",
10 10
             "request": "launch",
11 11
             "program": "${workspaceFolder}/smart_brain.py",
12 12
             "console": "integratedTerminal",

+ 1
- 1
devdi

@@ -1 +1 @@
1
-Subproject commit 1b8ad26f21c138580764a0f6355afeb2663d2a1f
1
+Subproject commit 66a471979d41bb6477b676dddd3f5959ba0326cc

+ 1
- 0
devices/__init__.py Wyświetl plik

@@ -43,6 +43,7 @@ from devices.silvercrest import silvercrest_motion_sensor
43 43
 from devices.mydevices import powerplug as my_powerplug
44 44
 from devices.mydevices import audio_status
45 45
 from devices.mydevices import remote
46
+my_ambient = None
46 47
 
47 48
 
48 49
 class group(object):

+ 7
- 0
function/first_floor_east.py Wyświetl plik

@@ -191,6 +191,8 @@ class first_floor_east_sleep(room):
191 191
         self.heating_valve = pd.get(props.STG_ZFE, loc, roo, props.FUN_HEA)
192 192
         # button
193 193
         self.button_tradfri = pd.get(props.STG_ZFE, loc, roo, props.FUN_INP)
194
+        # wardrobe light
195
+        self.wardrobe_light = pd.get(props.STG_ZFE, loc, roo, props.FUN_WLI)
194 196
 
195 197
         super().__init__(mqtt_client, pd, vd)
196 198
 
@@ -248,6 +250,11 @@ class first_floor_east_sleep(room):
248 250
             mqtt_client, config.TOPIC_FFE_SLEEP_ACTIVE_BRIGHTNESS_DEVICE_VIDEV,
249 251
             brightness_choose_n_action.KEY_ACTIVE_DEVICE, self.brightness_functions, 2
250 252
         )
253
+        self.wardrobe_light_videv = videv_switch_brightness(
254
+            mqtt_client, config.TOPIC_FFE_SLEEP_WARDROBE_LIGHT_VIDEV,
255
+            self.wardrobe_light, self.wardrobe_light.KEY_OUTPUT_0,
256
+            self.wardrobe_light, self.wardrobe_light.KEY_BRIGHTNESS,
257
+        )
251 258
 
252 259
 
253 260
 class first_floor_east_living(room):

+ 9
- 0
function/garden.py Wyświetl plik

@@ -32,7 +32,11 @@ class garden_garden(room):
32 32
         #
33 33
         self.day_events = day_event((6, 0), (22, 0), 30, -30)
34 34
 
35
+        # garden powerplugs
35 36
         self.garland_powerplug = pd.get(props.STG_ZGW, loc, roo, props.FUN_GAR)
37
+        # repeater
38
+        self.repeater = pd.get(props.STG_ZGW, loc, roo, props.FUN_REP)
39
+
36 40
         super().__init__(mqtt_client, pd, vd)
37 41
 
38 42
         #
@@ -52,6 +56,11 @@ class garden_garden(room):
52 56
             mqtt_client, config.TOPIC_GAR_GARDEN_GARLAND_VIDEV,
53 57
             self.garland_powerplug, self.garland_powerplug.KEY_OUTPUT_0
54 58
         )
59
+        # repeater
60
+        self.repeater_videv = videv_switching(
61
+            mqtt_client, config.TOPIC_GAR_GARDEN_REPEATER_VIDEV,
62
+            self.repeater, self.repeater.KEY_OUTPUT_0
63
+        )
55 64
 
56 65
     def __day_events__(self, device, key, data):
57 66
         if self.mode_videv.get(self.mode_videv.KEY_STATE):

+ 4
- 2
topics.py Wyświetl plik

@@ -25,8 +25,9 @@ TOPIC_GFW_DIRK_AUDIO_PLAYER_VIDEV = "videv/gfw/dirk/audio_player"
25 25
 TOPIC_GFW_DIRK_HEATING_VALVE_VIDEV = "videv/gfw/dirk/heating_valve"
26 26
 
27 27
 # garden
28
-TOPIC_GAR_GARDEN_MODE_VIDEV = 'videv/gar/garden/mode'
29
-TOPIC_GAR_GARDEN_GARLAND_VIDEV = 'videv/gar/garden/garland'
28
+TOPIC_GAR_GARDEN_MODE_VIDEV = "videv/gar/garden/mode"
29
+TOPIC_GAR_GARDEN_GARLAND_VIDEV = "videv/gar/garden/garland"
30
+TOPIC_GAR_GARDEN_REPEATER_VIDEV = "videv/gar/garden/repeater"
30 31
 
31 32
 # first floor west
32 33
 # julian
@@ -66,6 +67,7 @@ TOPIC_FFE_SLEEP_BED_LIGHT_DI_VIDEV = "videv/ffe/sleep/bed_light_di"
66 67
 TOPIC_FFE_SLEEP_BED_LIGHT_MA_VIDEV = "videv/ffe/sleep/bed_light_ma"
67 68
 TOPIC_FFE_SLEEP_ACTIVE_BRIGHTNESS_DEVICE_VIDEV = "videv/ffe/sleep/active_brightness_device"
68 69
 TOPIC_FFE_SLEEP_HEATING_VALVE_VIDEV = "videv/ffe/sleep/heating_valve"
70
+TOPIC_FFE_SLEEP_WARDROBE_LIGHT_VIDEV = "videv/ffe/sleep/wardrobe_light"
69 71
 
70 72
 # livingroom
71 73
 TOPIC_FFE_LIVINGROOM_MAIN_LIGHT_VIDEV = "videv/ffe/livingroom/main_light"

Ładowanie…
Anuluj
Zapisz