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
 import colored
1
 import colored
2
 import json
2
 import json
3
-import sys
4
 import task
3
 import task
5
 import time
4
 import time
6
 
5
 

+ 1
- 1
function/first_floor_east.py View File

198
 
198
 
199
         # heating
199
         # heating
200
         self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_FFE_SLEEP_HEATING_VALVE_GUI)
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
         def set_heating_setpoint(device, key, data):
203
         def set_heating_setpoint(device, key, data):
204
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
204
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)

+ 1
- 1
function/first_floor_west.py View File

65
 
65
 
66
         ##### TEMPORARY ###################################################################################################################
66
         ##### TEMPORARY ###################################################################################################################
67
         self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_FFW_BATH_HEATING_VALVE_GUI)
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
         def set_heating_setpoint(device, key, data):
70
         def set_heating_setpoint(device, key, data):
71
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
71
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)

+ 2
- 2
function/ground_floor_west.py View File

81
         self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.gui_main_light.set_state_mcb)
81
         self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.gui_main_light.set_state_mcb)
82
 
82
 
83
         self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_GFW_MARION_HEATING_VALVE_GUI)
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
         def set_heating_setpoint(device, key, data):
86
         def set_heating_setpoint(device, key, data):
87
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
87
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
225
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_PC_DOCK, None, self.gui_pc_dock.set_state_mcb)
225
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_PC_DOCK, None, self.gui_pc_dock.set_state_mcb)
226
 
226
 
227
         self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_GFW_DIRK_HEATING_VALVE_GUI)
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
         def set_heating_setpoint(device, key, data):
230
         def set_heating_setpoint(device, key, data):
230
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
231
             self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
294
             mqtt_client, config.TOPIC_GFW_DIRK_ACTIVE_BRIGHTNESS_DEVICE_VIDEV,
295
             mqtt_client, config.TOPIC_GFW_DIRK_ACTIVE_BRIGHTNESS_DEVICE_VIDEV,
295
             brightness_choose_n_action.KEY_ACTIVE_DEVICE, self.brightness_functions, 3
296
             brightness_choose_n_action.KEY_ACTIVE_DEVICE, self.brightness_functions, 3
296
         )
297
         )
297
-
298
         #
298
         #
299
         # Other stuff
299
         # Other stuff
300
         #
300
         #

+ 3
- 3
function/videv.py View File

234
 
234
 
235
 
235
 
236
 class videv_multistate(base):
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
         dv = dict.fromkeys(["state_%d" % i for i in range(0, num_states)])
238
         dv = dict.fromkeys(["state_%d" % i for i in range(0, num_states)])
239
         for key in dv:
239
         for key in dv:
240
             dv[key] = False
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
     def __index_rx__(self, device, key, data):
245
     def __index_rx__(self, device, key, data):
246
         for index, key in enumerate(self):
246
         for index, key in enumerate(self):

Loading…
Cancel
Save