Browse Source

ffw/sleep adde + some minor fixes

tags/v1.0.0
Dirk Alders 1 year ago
parent
commit
b554be3d6b

+ 1
- 1
.vscode/settings.json View File

@@ -8,4 +8,4 @@
8 8
     "emmet.includeLanguages": {
9 9
         "django-html": "html"
10 10
     }
11
-}
11
+}

+ 1
- 1
devices/__init__.py View File

@@ -484,7 +484,7 @@ class tradfri_light(base):
484 484
     TX_FILTER_DATA_KEYS = [KEY_OUTPUT_0, KEY_BRIGHTNESS, KEY_COLOR_TEMP, KEY_BRIGHTNESS_FADE]
485 485
     #
486 486
     RX_KEYS = [KEY_LINKQUALITY, KEY_OUTPUT_0, KEY_BRIGHTNESS, KEY_COLOR_TEMP]
487
-    RX_IGNORE_KEYS = ['update', 'color_mode']
487
+    RX_IGNORE_KEYS = ['update', 'color_mode', 'color_temp_startup']
488 488
     RX_FILTER_DATA_KEYS = [KEY_OUTPUT_0, KEY_BRIGHTNESS, KEY_COLOR_TEMP]
489 489
 
490 490
     def __init__(self, mqtt_client, topic):

+ 3
- 2
function/__init__.py View File

@@ -4,7 +4,7 @@
4 4
 import devices
5 5
 from function.stairway import stairway
6 6
 from function.ground_floor_west import ground_floor_west_floor, ground_floor_west_marion, ground_floor_west_dirk
7
-from function.first_floor_west import first_floor_west_julian, first_floor_west_living, first_floor_west_bath
7
+from function.first_floor_west import first_floor_west_julian, first_floor_west_living, first_floor_west_bath, first_floor_west_sleep
8 8
 from function.first_floor_east import first_floor_east_floor, first_floor_east_kitchen, first_floor_east_dining, first_floor_east_sleep, first_floor_east_living
9 9
 import inspect
10 10
 import logging
@@ -32,8 +32,9 @@ class all_functions(object):
32 32
         self.gfw_dirk = ground_floor_west_dirk(self.mqtt_client)
33 33
         # first floor west
34 34
         self.ffw_julian = first_floor_west_julian(self.mqtt_client)
35
-        self.ffw_living = first_floor_west_living(self.mqtt_client)
36 35
         self.ffw_bath = first_floor_west_bath(self.mqtt_client)
36
+        self.ffw_living = first_floor_west_living(self.mqtt_client)
37
+        self.ffw_sleep = first_floor_west_sleep(self.mqtt_client)
37 38
         # first floor east
38 39
         self.ffe_floor = first_floor_east_floor(self.mqtt_client)
39 40
         self.ffe_kitchen = first_floor_east_kitchen(self.mqtt_client)

+ 1
- 0
function/first_floor_east.py View File

@@ -100,6 +100,7 @@ class first_floor_east_sleep(room_shelly_tradfri_light):
100 100
     def all_off(self, device=None, key=None, data=None):
101 101
         super().all_off(device, key, data)
102 102
         self.bed_light_di_tradfri.set_output_0(False)
103
+        self.bed_light_ma_powerplug.set_output_0(False)
103 104
 
104 105
 
105 106
 class first_floor_east_living(room_shelly_tradfri_light):

+ 13
- 6
function/first_floor_west.py View File

@@ -21,14 +21,21 @@ class first_floor_west_julian(room_shelly_tradfri_light):
21 21
         super().__init__(mqtt_client, config.TOPIC_FFW_JULIAN_MAIN_LIGHT_SHELLY, config.TOPIC_FFW_JULIAN_MAIN_LIGHT_GUI, config.TOPIC_FFW_JULIAN_MAIN_LIGHT_ZIGBEE)
22 22
 
23 23
 
24
-class first_floor_west_living(room_shelly):
25
-    # http://shelly1l-84CCA8ACE6A1
26
-    def __init__(self, mqtt_client):
27
-        super().__init__(mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_SHELLY, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_GUI)
28
-
29
-
30 24
 class first_floor_west_bath(object):
31 25
     def __init__(self, mqtt_client):
32 26
         # radiator valve
33 27
         self.radiator_function = radiator_function(mqtt_client, config.TOPIC_FFW_BATH_RADIATOR_VALVE_ZIGBEE,
34 28
                                                    config.TOPIC_FFW_BATH_RADIATOR_VALVE_GUI, config.DEFAULT_TEMPERATURE_FFW_BATH)
29
+
30
+
31
+class first_floor_west_living(room_shelly_tradfri_light):
32
+    # http://shelly1l-84CCA8ACE6A1
33
+    def __init__(self, mqtt_client):
34
+        super().__init__(mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_SHELLY,
35
+                         config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_GUI, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_ZIGBEE)
36
+
37
+
38
+class first_floor_west_sleep(room_shelly_tradfri_light):
39
+    # http://shelly1-3494546A51F2
40
+    def __init__(self, mqtt_client):
41
+        super().__init__(mqtt_client, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_SHELLY, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_GUI, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_ZIGBEE)

+ 1
- 2
function/rooms.py View File

@@ -97,8 +97,7 @@ class room_shelly_motion_sensor(room_shelly):
97 97
 
98 98
     def reset_timer(self, device=None, key=None, data=None):
99 99
         self.main_light_timer = None
100
-        self.motion_detected_1 = False
101
-        self.motion_detected_2 = False
100
+        self.gui_main_light.set_timer('-')
102 101
 
103 102
     def cyclic_task(self, cyclic_task):
104 103
         if self.main_light_timer is not None:

Loading…
Cancel
Save