Browse Source

Shellies for FFW floor and bath added

master
Dirk Alders 2 months ago
parent
commit
a0375245b4
3 changed files with 38 additions and 3 deletions
  1. 1
    1
      devdi
  2. 5
    0
      function/__init__.py
  3. 32
    2
      function/first_floor_west.py

+ 1
- 1
devdi

1
-Subproject commit 66a471979d41bb6477b676dddd3f5959ba0326cc
1
+Subproject commit 8f8ace13c131abf9c4dfb79087fa1c13c76805d2

+ 5
- 0
function/__init__.py View File

71
         # FFE ALL OFF - Long push input device
71
         # FFE ALL OFF - Long push input device
72
         self.ffe.sleep.button_tradfri.add_callback(devices.tradfri_button.KEY_ACTION, devices.tradfri_button.ACTION_RIGHT_LONG, self.ffe.all_off)
72
         self.ffe.sleep.button_tradfri.add_callback(devices.tradfri_button.KEY_ACTION, devices.tradfri_button.ACTION_RIGHT_LONG, self.ffe.all_off)
73
 
73
 
74
+        # FFW ALL OFF - Long push ffw_floor
75
+        self.ffw.floor.main_light_shelly.add_callback(self.ffw.floor.main_light_shelly.KEY_LONGPUSH_0,
76
+                                                      True, self.ffw.floor.main_light_shelly.flash_0_mcb)
77
+        self.ffw.floor.main_light_shelly.add_callback(self.ffw.floor.main_light_shelly.KEY_LONGPUSH_0, True, self.ffw.all_off)
78
+
74
     def init_sumer_winter_mode(self):
79
     def init_sumer_winter_mode(self):
75
         # ALL summer/winter mode
80
         # ALL summer/winter mode
76
         self.videv_summer_mode = videv_pure_switch(self.mqtt_client, config.TOPIC_ALL_SUMMER_WINTER_MODE)
81
         self.videv_summer_mode = videv_pure_switch(self.mqtt_client, config.TOPIC_ALL_SUMMER_WINTER_MODE)

+ 32
- 2
function/first_floor_west.py View File

7
 from function.db import get_radiator_data, set_radiator_data
7
 from function.db import get_radiator_data, set_radiator_data
8
 from function.modules import heating_function
8
 from function.modules import heating_function
9
 from function.rooms import room, room_collection
9
 from function.rooms import room, room_collection
10
-from function.videv import videv_switch_brightness, videv_switch_brightness_color_temp, videv_heating
10
+from function.videv import videv_switch_brightness, videv_switch_brightness_color_temp, videv_heating, videv_switching
11
 import logging
11
 import logging
12
 
12
 
13
 
13
 
23
 class first_floor_west(room_collection):
23
 class first_floor_west(room_collection):
24
     def __init__(self, mqtt_client, pd, vd):
24
     def __init__(self, mqtt_client, pd, vd):
25
         super().__init__(mqtt_client, pd, vd)
25
         super().__init__(mqtt_client, pd, vd)
26
+        self.floor = first_floor_west_floor(mqtt_client, pd, vd)
26
         self.bath = first_floor_west_bath(mqtt_client, pd, vd)
27
         self.bath = first_floor_west_bath(mqtt_client, pd, vd)
27
         self.julian = first_floor_west_julian(mqtt_client, pd, vd)
28
         self.julian = first_floor_west_julian(mqtt_client, pd, vd)
28
         self.livingroom = first_floor_west_living(mqtt_client, pd, vd)
29
         self.livingroom = first_floor_west_living(mqtt_client, pd, vd)
29
         self.sleep = first_floor_west_sleep(mqtt_client, pd, vd)
30
         self.sleep = first_floor_west_sleep(mqtt_client, pd, vd)
30
 
31
 
31
 
32
 
33
+class first_floor_west_floor(room):
34
+    def __init__(self, mqtt_client, pd, vd):
35
+        roo = props.ROO_FLO
36
+        #
37
+        # Device initialisation
38
+        #
39
+        # http://shelly1-58BF25D848EA
40
+        # main light
41
+        self.main_light_shelly = pd.get(props.STG_SHE, loc, roo, props.FUN_MAL)
42
+        super().__init__(mqtt_client, pd, vd)
43
+
44
+        #
45
+        # Virtual Device Interface
46
+        #
47
+        # main light
48
+        self.main_light = videv_switching(
49
+            mqtt_client, config.TOPIC_FFE_FLOOR_MAIN_LIGHT_VIDEV,
50
+            self.main_light_shelly, self.main_light_shelly.KEY_OUTPUT_0
51
+        )
52
+
53
+
32
 class first_floor_west_julian(room):
54
 class first_floor_west_julian(room):
33
     def __init__(self, mqtt_client, pd, vd):
55
     def __init__(self, mqtt_client, pd, vd):
34
         roo = props.ROO_JUL
56
         roo = props.ROO_JUL
76
         #
98
         #
77
         # Device initialisation
99
         # Device initialisation
78
         #
100
         #
101
+        # http://shelly1-58BF25D84219
102
+        # main light
103
+        self.main_light_shelly = pd.get(props.STG_SHE, loc, roo, props.FUN_MAL)
79
         # heating function
104
         # heating function
80
         self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA)
105
         self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA)
81
         super().__init__(mqtt_client, pd, vd)
106
         super().__init__(mqtt_client, pd, vd)
94
         #
119
         #
95
         # Virtual Device Interface
120
         # Virtual Device Interface
96
         #
121
         #
122
+        # main light
123
+        self.main_light = videv_switching(
124
+            mqtt_client, config.TOPIC_FFE_FLOOR_MAIN_LIGHT_VIDEV,
125
+            self.main_light_shelly, self.main_light_shelly.KEY_OUTPUT_0
126
+        )
97
         # heating function
127
         # heating function
98
         self.heating_function_videv = videv_heating(
128
         self.heating_function_videv = videv_heating(
99
             mqtt_client, config.TOPIC_FFW_BATH_HEATING_VALVE_VIDEV,
129
             mqtt_client, config.TOPIC_FFW_BATH_HEATING_VALVE_VIDEV,
157
         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)
158
         super().__init__(mqtt_client, pd, vd)
188
         super().__init__(mqtt_client, pd, vd)
159
 
189
 
160
-        #  
190
+        #
161
         # Functionality initialisation
191
         # Functionality initialisation
162
         #
192
         #
163
         # heating function
193
         # heating function

Loading…
Cancel
Save