Hi,
Currently trying to setup a thermostat with the “generic_thermostat”. Which is going well except one problem. I would like to change the comfort temperature dynamically to be 3deg above current temperature. So I can switch into comfort mode okay and set the target temperature okay using the following:
service: climate.set_temperature
data:
temperature: "{{ state_attr('climate.under_floor_heating','current_temperature') + 3 }}"
target:
entity_id: climate.under_floor_heating
The problem comes if the current setpoint is higher than the new comfort temperature setpoint. This causes heating control to switch off… even though the target is still above the actual temperature by 3deg. I’m assuming this is bug.
So what I would like to do is the following logic:
IF current_temperature + 3 > target_temperature THEN
SET current_temperature +3
ELSE
SET target_temperature
ENDIF
But how… I tried
{% if (climate.under_floor_heating.attribute.current_temperature + 3) > climate.under_floor_heating.attribute.target_temperature %}
"{{ climate.under_floor_heating.attribute.current_temperature + 3 }}"
{% else %}
"{{ climate.under_floor_heating.attribute.target_temperature }}"
{% endif %}
And
{% if (state_attr('climate.under_floor_heating','current_temperature') + 3) > state_attr('climate.under_floor_heating','target_temperature') %}
"{{ state_attr('climate.under_floor_heating','current_temperature') + 3 }}"
{% else %}
"{{ state_attr('climate.under_floor_heating','target_temperature') }}"
{% endif %}
What am I doing wrong?
climate:
- platform: generic_thermostat
name: Under Floor Heating
heater: switch.heating_underfloor_heating_control
target_sensor: sensor.lumi_lumi_weather_temperature_2
min_temp: 12
max_temp: 36
ac_mode: false
target_temp: 17
cold_tolerance: 1.0
hot_tolerance: 0
min_cycle_duration: 15
keep_alive: 0
initial_hvac_mode: "off"
away_temp: 12
comfort_temp: 21
precision: 0.1