- id: target_flow_temp
type: float
restore_value: no
+ - id: last_set_flow_temp
+ type: float
+ restore_value: no
-# Don't make the flow temp jump up too quickly. Only let it get 2°C higher than the
+# Don't make the flow temp jump up too quickly. Only let it get 3°C higher than the
# actual flow temp, to avoid firing up both heat pumps if the heat demand from the
# house isn't smooth enough.
script:
if (!set_next || !id(auto_flow_temp).state)
return;
float cur_flow_temp = id(hp_feed_temp).state;
- if (set_next > cur_flow_temp + 2.0)
- set_next = cur_flow_temp + 2.0;
- ESP_LOGI("Evohome", "Flow temp set to %f °C (want %f °C)", set_next, id(target_flow_temp));
- id(ecodan_instance).set_flow_target_temperature(set_next, esphome::ecodan::SetZone::ZONE_1);
+ if (set_next > cur_flow_temp + 3.0) {
+ set_next = cur_flow_temp + 3.0;
+ // Always ratchet it up, don't let it go down if the actual flow temp does.
+ if (set_next < id(last_set_flow_temp))
+ set_next = id(last_set_flow_temp);
+ // But not above the target.
+ if (set_next > id(target_flow_temp))
+ set_next = id(target_flow_temp);
+ }
+ if (set_next == id(last_set_flow_temp)) {
+ ESP_LOGI("Evohome", "Flow temp already set to %f °C (cur %f °C, want %f °C)", set_next, cur_flow_temp, id(target_flow_temp));
+ } else {
+ ESP_LOGI("Evohome", "Flow temp set to %f °C (cur %f °C, want %f °C)", set_next, cur_flow_temp, id(target_flow_temp));
+ id(ecodan_instance).set_flow_target_temperature(set_next, esphome::ecodan::SetZone::ZONE_1);
+ id(last_set_flow_temp) = set_next;
+ }
# relay
switch:
- interval: 30s
then:
- lambda: |-
- if (id(target_flow_temp) && id(auto_flow_temp).state)
+ if (id(auto_flow_temp).state && id(target_flow_temp) && id(target_flow_temp) != id(last_set_flow_temp))
id(adjust_flow_temp).execute();