I am trying to create a sensor that will simply tell me if any of my tado radiator valves are set to ‘heat’ rather than ‘auto’. This code always give the answer that none are set to ‘heat’ regardless of how many radiators have the ‘heat’ value.
- platform: template
sensors:
heating_summary:
friendly_name: ‘Heating Summary’
value_template: >-
{% set heating_entities = states.climate | selectattr(‘attributes.hvac_mode’, ‘eq’, ‘heat’) %}
{% if heating_entities | list | count > 0 %}
Some climate entities are set to heat.
{% else %}
No climate entities are set to heat.
{% endif %}