Selaa lähdekoodia

Bath radiator boost on Circulation pump; simulation updated

tags/v1.0.0
Dirk Alders 2 vuotta sitten
vanhempi
commit
8e036218a0
3 muutettua tiedostoa jossa 24 lisäystä ja 2 poistoa
  1. 1
    1
      __simulation__/devices.py
  2. 21
    1
      __simulation__/rooms.py
  3. 2
    0
      function/__init__.py

+ 1
- 1
__simulation__/devices.py Näytä tiedosto

@@ -829,7 +829,7 @@ class gui_radiator_valve(base):
829 829
             except TypeError:
830 830
                 value = 0
831 831
                 perc = 0
832
-            print_percent(COLOR_GUI_ACTIVE, 'T', perc, "%4.1fmin" % value, self.topic, "(Timer)")
832
+            print_percent(COLOR_GUI_ACTIVE, 't', perc, "%4.1fmin" % value, self.topic, "(Timer)")
833 833
         elif key == self.KEY_TEMPERATURE:
834 834
             perc = 100 * (value - self.TEMP_RANGE[0]) / (self.TEMP_RANGE[1] - self.TEMP_RANGE[0])
835 835
             perc = 100 if perc > 100 else perc

+ 21
- 1
__simulation__/rooms.py Näytä tiedosto

@@ -56,6 +56,8 @@ class gfw_marion(base):
56 56
         self.gui_main_light = gui_light(mqtt_client, config.TOPIC_GFW_MARION_MAIN_LIGHT_GUI, True, False, False)
57 57
         self.main_light = shelly(mqtt_client, config.TOPIC_GFW_MARION_MAIN_LIGHT_SHELLY, input_0_func=shelly.INPUT_FUNC_OUT1_TRIGGER)
58 58
         self.main_light.add_channel_name(shelly.KEY_OUTPUT_0, "Main Light")
59
+        self.radiator_valve = brennenstuhl_radiator_valve(mqtt_client, config.TOPIC_GFW_MARION_RADIATOR_VALVE_ZIGBEE)
60
+        self.gui_radiator_valve = gui_radiator_valve(mqtt_client, config.TOPIC_GFW_MARION_RADIATOR_VALVE_GUI)
59 61
 
60 62
 
61 63
 class gfw_dirk(base):
@@ -87,6 +89,9 @@ class gfw_dirk(base):
87 89
         self.led_array.add_channel_name(gui_led_array.KEY_LED_0, "Main Light")
88 90
         self.led_array.add_channel_name(gui_led_array.KEY_LED_1, "Desk Light")
89 91
         self.led_array.add_channel_name(gui_led_array.KEY_LED_2, "Amplifier")
92
+        #
93
+        self.radiator_valve = brennenstuhl_radiator_valve(mqtt_client, config.TOPIC_GFW_DIRK_RADIATOR_VALVE_ZIGBEE)
94
+        self.gui_radiator_valve = gui_radiator_valve(mqtt_client, config.TOPIC_GFW_DIRK_RADIATOR_VALVE_GUI)
90 95
 
91 96
 
92 97
 class gfw(base):
@@ -108,15 +113,30 @@ class ffw_julian(base):
108 113
 
109 114
 class ffw_livingroom(base):
110 115
     def __init__(self, mqtt_client):
111
-        self.gui_main_light = gui_light(mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_GUI, True, False, False)
116
+        self.gui_main_light = gui_light(mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_GUI, True, True, True)
112 117
         self.main_light = shelly(mqtt_client, config.TOPIC_FFW_LIVINGROOM_MAIN_LIGHT_SHELLY, input_0_func=shelly.INPUT_FUNC_OUT1_TRIGGER)
113 118
         self.main_light.add_channel_name(shelly.KEY_OUTPUT_0, "Main Light")
114 119
 
115 120
 
121
+class ffw_sleep(base):
122
+    def __init__(self, mqtt_client):
123
+        self.gui_main_light = gui_light(mqtt_client, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_GUI, True, True, False)
124
+        self.main_light = shelly(mqtt_client, config.TOPIC_FFW_SLEEP_MAIN_LIGHT_SHELLY, input_0_func=shelly.INPUT_FUNC_OUT1_TRIGGER)
125
+        self.main_light.add_channel_name(shelly.KEY_OUTPUT_0, "Main Light")
126
+
127
+
128
+class ffw_bath(base):
129
+    def __init__(self, mqtt_client):
130
+        self.radiator_valve = brennenstuhl_radiator_valve(mqtt_client, config.TOPIC_FFW_BATH_RADIATOR_VALVE_ZIGBEE)
131
+        self.gui_radiator_valve = gui_radiator_valve(mqtt_client, config.TOPIC_FFW_BATH_RADIATOR_VALVE_GUI)
132
+
133
+
116 134
 class ffw(base):
117 135
     def __init__(self, mqtt_client):
118 136
         self.julian = ffw_julian(mqtt_client)
119 137
         self.livingroom = ffw_livingroom(mqtt_client)
138
+        self.sleep = ffw_sleep(mqtt_client)
139
+        self.bath = ffw_bath(mqtt_client)
120 140
 
121 141
 
122 142
 class ffe_floor(base):

+ 2
- 0
function/__init__.py Näytä tiedosto

@@ -109,6 +109,8 @@ class all_functions(object):
109 109
         # tradfri button ffe_sleep right click
110 110
         self.ffe_sleep.button_tradfri.add_callback(devices.tradfri_button.KEY_ACTION,
111 111
                                                    devices.tradfri_button.ACTION_RIGHT, self.ffe_floor.main_light_shelly.toggle_output_0_mcb)
112
+        self.ffe_kitchen.circulation_pump.main_light_shelly.add_callback(
113
+            devices.shelly.KEY_OUTPUT_0, True, self.ffw_bath.radiator_function.boost, True)
112 114
 
113 115
     def gfw_dirk_input_1(self, device, key, data):
114 116
         if self.last_gfw_dirk_input_1 is not None:

Loading…
Peruuta
Tallenna