|
@@ -9,7 +9,7 @@ from function.ground_floor_west import ground_floor_west
|
9
|
9
|
from function.first_floor_west import first_floor_west
|
10
|
10
|
from function.first_floor_east import first_floor_east
|
11
|
11
|
from function.rooms import room_collection
|
12
|
|
-from function.videv import all_off
|
|
12
|
+from function.videv import all_off, videv_pure_switch
|
13
|
13
|
import logging
|
14
|
14
|
|
15
|
15
|
try:
|
|
@@ -42,6 +42,8 @@ class all_functions(room_collection):
|
42
|
42
|
self.init_cross_room_interactions()
|
43
|
43
|
# Off Buttons
|
44
|
44
|
self.init_off_functionality()
|
|
45
|
+ # Summer / Winter mode
|
|
46
|
+ self.init_sumer_winter_mode()
|
45
|
47
|
|
46
|
48
|
def init_cross_room_interactions(self):
|
47
|
49
|
# shelly dirk input 1
|
|
@@ -69,6 +71,14 @@ class all_functions(room_collection):
|
69
|
71
|
# FFE ALL OFF - Long push input device
|
70
|
72
|
self.ffe.sleep.button_tradfri.add_callback(devices.tradfri_button.KEY_ACTION, devices.tradfri_button.ACTION_RIGHT_LONG, self.ffe.all_off)
|
71
|
73
|
|
|
74
|
+ def init_sumer_winter_mode(self):
|
|
75
|
+ # ALL summer/winter mode
|
|
76
|
+ self.videv_summer_mode = videv_pure_switch(self.mqtt_client, config.TOPIC_ALL_SUMMER_WINTER_MODE)
|
|
77
|
+
|
|
78
|
+ self.videv_summer_mode.add_callback(self.videv_summer_mode.KEY_STATE, None, self.gfw.summer_mode)
|
|
79
|
+ self.videv_summer_mode.add_callback(self.videv_summer_mode.KEY_STATE, None, self.ffw.summer_mode)
|
|
80
|
+ self.videv_summer_mode.add_callback(self.videv_summer_mode.KEY_STATE, None, self.ffe.summer_mode)
|
|
81
|
+
|
72
|
82
|
def gfw_dirk_input_1(self, device, key, data):
|
73
|
83
|
if self.last_gfw_dirk_input_1 is not None:
|
74
|
84
|
if self.last_gfw_dirk_input_1 != data:
|