Bug-Fix: current cemperature heating + brightness device selection in videv
This commit is contained in:
parent
4ddc871aa1
commit
9d550f1b04
@ -1,6 +1,5 @@
|
|||||||
import colored
|
import colored
|
||||||
import json
|
import json
|
||||||
import sys
|
|
||||||
import task
|
import task
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ class first_floor_east_sleep(room):
|
|||||||
|
|
||||||
# heating
|
# heating
|
||||||
self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_FFE_SLEEP_HEATING_VALVE_GUI)
|
self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_FFE_SLEEP_HEATING_VALVE_GUI)
|
||||||
self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_SETPOINT, None, self.gui_heating.set_temperature_mcb, True)
|
self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_CURRENT, None, self.gui_heating.set_temperature_mcb, True)
|
||||||
|
|
||||||
def set_heating_setpoint(device, key, data):
|
def set_heating_setpoint(device, key, data):
|
||||||
self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
|
self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
|
||||||
|
@ -65,7 +65,7 @@ class first_floor_west_bath(room):
|
|||||||
|
|
||||||
##### TEMPORARY ###################################################################################################################
|
##### TEMPORARY ###################################################################################################################
|
||||||
self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_FFW_BATH_HEATING_VALVE_GUI)
|
self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_FFW_BATH_HEATING_VALVE_GUI)
|
||||||
self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_SETPOINT, None, self.gui_heating.set_temperature_mcb, True)
|
self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_CURRENT, None, self.gui_heating.set_temperature_mcb, True)
|
||||||
|
|
||||||
def set_heating_setpoint(device, key, data):
|
def set_heating_setpoint(device, key, data):
|
||||||
self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
|
self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
|
||||||
|
@ -81,7 +81,7 @@ class ground_floor_west_marion(room):
|
|||||||
self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.gui_main_light.set_state_mcb)
|
self.main_light_shelly.add_callback(devices.shelly.KEY_OUTPUT_0, None, self.gui_main_light.set_state_mcb)
|
||||||
|
|
||||||
self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_GFW_MARION_HEATING_VALVE_GUI)
|
self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_GFW_MARION_HEATING_VALVE_GUI)
|
||||||
self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_SETPOINT, None, self.gui_heating.set_temperature_mcb, True)
|
self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_CURRENT, None, self.gui_heating.set_temperature_mcb, True)
|
||||||
|
|
||||||
def set_heating_setpoint(device, key, data):
|
def set_heating_setpoint(device, key, data):
|
||||||
self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
|
self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
|
||||||
@ -225,6 +225,7 @@ class ground_floor_west_dirk(room):
|
|||||||
self.powerplug_common.add_callback(self.KEY_POWERPLUG_PC_DOCK, None, self.gui_pc_dock.set_state_mcb)
|
self.powerplug_common.add_callback(self.KEY_POWERPLUG_PC_DOCK, None, self.gui_pc_dock.set_state_mcb)
|
||||||
|
|
||||||
self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_GFW_DIRK_HEATING_VALVE_GUI)
|
self.gui_heating = devices.nodered_gui_radiator(mqtt_client, config.TOPIC_GFW_DIRK_HEATING_VALVE_GUI)
|
||||||
|
self.heating_function.add_callback(heating_function.KEY_TEMPERATURE_CURRENT, None, self.gui_heating.set_temperature_mcb, True)
|
||||||
|
|
||||||
def set_heating_setpoint(device, key, data):
|
def set_heating_setpoint(device, key, data):
|
||||||
self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
|
self.heating_function.set(heating_function.KEY_USER_TEMPERATURE_SETPOINT, data)
|
||||||
@ -294,7 +295,6 @@ class ground_floor_west_dirk(room):
|
|||||||
mqtt_client, config.TOPIC_GFW_DIRK_ACTIVE_BRIGHTNESS_DEVICE_VIDEV,
|
mqtt_client, config.TOPIC_GFW_DIRK_ACTIVE_BRIGHTNESS_DEVICE_VIDEV,
|
||||||
brightness_choose_n_action.KEY_ACTIVE_DEVICE, self.brightness_functions, 3
|
brightness_choose_n_action.KEY_ACTIVE_DEVICE, self.brightness_functions, 3
|
||||||
)
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Other stuff
|
# Other stuff
|
||||||
#
|
#
|
||||||
|
@ -234,13 +234,13 @@ class videv_heating(base_routing):
|
|||||||
|
|
||||||
|
|
||||||
class videv_multistate(base):
|
class videv_multistate(base):
|
||||||
def __init__(self, mqtt_client, topic, key, device, num_states, default_values=None):
|
def __init__(self, mqtt_client, topic, key_for_topic, device, num_states, default_values=None):
|
||||||
dv = dict.fromkeys(["state_%d" % i for i in range(0, num_states)])
|
dv = dict.fromkeys(["state_%d" % i for i in range(0, num_states)])
|
||||||
for key in dv:
|
for key in dv:
|
||||||
dv[key] = False
|
dv[key] = False
|
||||||
super().__init__(mqtt_client, topic, (key, device), default_values=dv)
|
super().__init__(mqtt_client, topic, (key_for_topic, device), default_values=dv)
|
||||||
#
|
#
|
||||||
device.add_callback(key, None, self.__index_rx__, True)
|
device.add_callback(key_for_topic, None, self.__index_rx__, True)
|
||||||
|
|
||||||
def __index_rx__(self, device, key, data):
|
def __index_rx__(self, device, key, data):
|
||||||
for index, key in enumerate(self):
|
for index, key in enumerate(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user