Upgraded from 2021.4.6 to 2021.6.6 and this template sensor doesn’t seem to work anymore.
If I paste it into Developer Tools - Template, it works as desired.
If HVAC fan is off, proper operating mode is shown in Lovelace. But when in cooling mode, it shows Fan Only.
Developer Tools - Template:
Lovelace:
Any ideas?
hvac_mode:
friendly_name: HVAC Operating Mode
value_template: >-
{% set hvac_temp_delta = states('sensor.supply_temp') | float - states('sensor.return_temp') | float %}
{% if is_state("binary_sensor.furnace_fan", "on") and hvac_temp_delta > 10 -%}
Heating
{%- elif is_state("binary_sensor.furnace_fan", "on") and hvac_temp_delta < -10 -%}
Cooling
{%- elif is_state("binary_sensor.furnace_fan", "on") and 11 > hvac_temp_delta > -11 -%}
Fan Only
{%- elif is_state("binary_sensor.furnace_fan", "off") -%}
Off
{%- else %}
Unknown
{%- endif %}