Browse Source

Bug-Fix: current cemperature heating + brightness device selection in videv

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

+ 0
- 1
__simulation__/devices.py View File

@@ -1,6 +1,5 @@
1 1
 import colored
2 2
 import json
3
-import sys
4 3
 import task
5 4
 import time
6 5
 

+ 1
- 1
function/first_floor_east.py View File

@@ -198,7 +198,7 @@ class first_floor_east_sleep(room):
198 198
 
199 199
         # heating
200 200
         self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_FFE_SLEEP_HEATING_VALVE_GUI)
201
-        self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_SETPOINT, None, self.gui_heating.set_temperature_mcb, True)
201
+        self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_CURRENT, None, self.gui_heating.set_temperature_mcb, True)
202 202
 
203 203
         def set_heating_setpoint(device, key, data):
204 204
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)

+ 1
- 1
function/first_floor_west.py View File

@@ -65,7 +65,7 @@ class first_floor_west_bath(room):
65 65
 
66 66
         ##### TEMPORARY ###################################################################################################################
67 67
         self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_FFW_BATH_HEATING_VALVE_GUI)
68
-        self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_SETPOINT, None, self.gui_heating.set_temperature_mcb, True)
68
+        self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_CURRENT, None, self.gui_heating.set_temperature_mcb, True)
69 69
 
70 70
         def set_heating_setpoint(device, key, data):
71 71
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)

+ 2
- 2
function/ground_floor_west.py View File

@@ -81,7 +81,7 @@ class ground_floor_west_marion(room):
81 81
         self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.gui_main_light.set_state_mcb)
82 82
 
83 83
         self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_GFW_MARION_HEATING_VALVE_GUI)
84
-        self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_SETPOINT, None, self.gui_heating.set_temperature_mcb, True)
84
+        self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_CURRENT, None, self.gui_heating.set_temperature_mcb, True)
85 85
 
86 86
         def set_heating_setpoint(device, key, data):
87 87
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
@@ -225,6 +225,7 @@ class ground_floor_west_dirk(room):
225 225
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_PC_DOCK, None, self.gui_pc_dock.set_state_mcb)
226 226
 
227 227
         self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_GFW_DIRK_HEATING_VALVE_GUI)
228
+        self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_CURRENT, None, self.gui_heating.set_temperature_mcb, True)
228 229
 
229 230
         def set_heating_setpoint(device, key, data):
230 231
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
@@ -294,7 +295,6 @@ class ground_floor_west_dirk(room):
294 295
             mqtt_client, config.TOPIC_GFW_DIRK_ACTIVE_BRIGHTNESS_DEVICE_VIDEV,
295 296
             brightness_choose_n_action.KEY_ACTIVE_DEVICE, self.brightness_functions, 3
296 297
         )
297
-
298 298
         #
299 299
         # Other stuff
300 300
         #

+ 3
- 3
function/videv.py View File

@@ -234,13 +234,13 @@ class videv_heating(base_routing):
234 234
 
235 235
 
236 236
 class videv_multistate(base):
237
-    def __init__(self, mqtt_client, topic, key, device, num_states, default_values=None):
237
+    def __init__(self, mqtt_client, topic, key_for_topic, device, num_states, default_values=None):
238 238
         dv = dict.fromkeys(["state_%d" % i for i in range(0, num_states)])
239 239
         for key in dv:
240 240
             dv[key] = False
241
-        super().__init__(mqtt_client, topic, (key, device), default_values=dv)
241
+        super().__init__(mqtt_client, topic, (key_for_topic, device), default_values=dv)
242 242
         #
243
-        device.add_callback(key, None, self.__index_rx__, True)
243
+        device.add_callback(key_for_topic, None, self.__index_rx__, True)
244 244
 
245 245
     def __index_rx__(self, device, key, data):
246 246
         for index, key in enumerate(self):

Loading…
Cancel
Save