|
@@ -7,7 +7,7 @@ from devdi import topic as props
|
7
|
7
|
from function.db import get_radiator_data, set_radiator_data
|
8
|
8
|
from function.modules import heating_function
|
9
|
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
|
11
|
import logging
|
12
|
12
|
|
13
|
13
|
|
|
@@ -23,12 +23,34 @@ loc = props.LOC_FFW
|
23
|
23
|
class first_floor_west(room_collection):
|
24
|
24
|
def __init__(self, mqtt_client, pd, vd):
|
25
|
25
|
super().__init__(mqtt_client, pd, vd)
|
|
26
|
+ self.floor = first_floor_west_floor(mqtt_client, pd, vd)
|
26
|
27
|
self.bath = first_floor_west_bath(mqtt_client, pd, vd)
|
27
|
28
|
self.julian = first_floor_west_julian(mqtt_client, pd, vd)
|
28
|
29
|
self.livingroom = first_floor_west_living(mqtt_client, pd, vd)
|
29
|
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
|
54
|
class first_floor_west_julian(room):
|
33
|
55
|
def __init__(self, mqtt_client, pd, vd):
|
34
|
56
|
roo = props.ROO_JUL
|
|
@@ -76,6 +98,9 @@ class first_floor_west_bath(room):
|
76
|
98
|
#
|
77
|
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
|
104
|
# heating function
|
80
|
105
|
self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA)
|
81
|
106
|
super().__init__(mqtt_client, pd, vd)
|
|
@@ -94,6 +119,11 @@ class first_floor_west_bath(room):
|
94
|
119
|
#
|
95
|
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
|
127
|
# heating function
|
98
|
128
|
self.heating_function_videv = videv_heating(
|
99
|
129
|
mqtt_client, config.TOPIC_FFW_BATH_HEATING_VALVE_VIDEV,
|
|
@@ -157,7 +187,7 @@ class first_floor_west_sleep(room):
|
157
|
187
|
self.heating_valve = pd.get(props.STG_ZFW, loc, roo, props.FUN_HEA)
|
158
|
188
|
super().__init__(mqtt_client, pd, vd)
|
159
|
189
|
|
160
|
|
- #
|
|
190
|
+ #
|
161
|
191
|
# Functionality initialisation
|
162
|
192
|
#
|
163
|
193
|
# heating function
|