cyclic setpoint for heating valve implemented
This commit is contained in:
parent
7462d7278e
commit
da402db1ef
@ -154,7 +154,7 @@ class heating_function(common_base):
|
|||||||
SUMMER_TEMPERATURE = 5
|
SUMMER_TEMPERATURE = 5
|
||||||
|
|
||||||
class value_timeout_list(object):
|
class value_timeout_list(object):
|
||||||
MAX_DELAY = 3
|
MAX_DELAY = 10
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__data__ = []
|
self.__data__ = []
|
||||||
@ -208,12 +208,17 @@ class heating_function(common_base):
|
|||||||
# cyclic task initialisation
|
# cyclic task initialisation
|
||||||
self.ct = task.periodic(1, self.cyclic_task)
|
self.ct = task.periodic(1, self.cyclic_task)
|
||||||
self.ct.run()
|
self.ct.run()
|
||||||
|
self.ct2 = task.periodic(5 * 60, self.cyclic_task_tx_setpoint)
|
||||||
|
self.ct2.run()
|
||||||
|
|
||||||
def timer_expired(self, device, data, key):
|
def timer_expired(self, device, data, key):
|
||||||
self.set(self.KEY_TEMPERATURE_SETPOINT, self[self.KEY_USER_TEMPERATURE_SETPOINT])
|
self.set(self.KEY_TEMPERATURE_SETPOINT, self[self.KEY_USER_TEMPERATURE_SETPOINT])
|
||||||
self.heating_valve.logger.info('Timer expired. returning to regular temperature setpoint %.1f°C.',
|
self.heating_valve.logger.info('Timer expired. returning to regular temperature setpoint %.1f°C.',
|
||||||
self[self.KEY_TEMPERATURE_SETPOINT])
|
self[self.KEY_TEMPERATURE_SETPOINT])
|
||||||
|
|
||||||
|
def cyclic_task_tx_setpoint(self, rt):
|
||||||
|
self.heating_valve.set_heating_setpoint(self.get(self.KEY_TEMPERATURE_SETPOINT))
|
||||||
|
|
||||||
def cyclic_task(self, rt):
|
def cyclic_task(self, rt):
|
||||||
timer_value = self[self.KEY_BOOST_TIMER] - self.ct.cycle_time
|
timer_value = self[self.KEY_BOOST_TIMER] - self.ct.cycle_time
|
||||||
if self[self.KEY_BOOST_TIMER] <= 0:
|
if self[self.KEY_BOOST_TIMER] <= 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user