I think I’ve drafted a new sensor to recommend a suitable boiler flow temperature based on the outside temperature at my home (rounded to the nearest degree):
- sensor:
- name: House Boiler Flow Temperature
unit_of_measurement: "°C"
availability: >
{{ states('sensor.outside_temperature_rounded') not in ['unavailable', 'unknown'] }}
state: >
{% set Toutside = states('sensor.outside_temperature_rounded') | float(0) %}
{% if 50 > Toutside > 12.5 %} 50
{% elif 12.5 > Toutside > 9.5 %} 50
{% elif 9.5 > Toutside > 5.5 %} 55
{% elif 5.5 > Toutside > 0.5 %} 55
{% else %} 60
{% endif %}```
This matches the format of other templates I have found online and have modified for other things in my Config.
However, I have also seen templates where instead of "state: >" in the 7th row they use "value_template: >-".
Which one should I use in my template please? And why?
Many thanks.