I have 3 mqtt climate thermostats. I am trying to create a template sensor that shoud have the value of 0 none of them is on (=heating mode) and return a non-zero number if any one has the heating on. I created the following configuration, after searching a lot on the internet, but it doesn’t work:
template:
- sensor:
- name: "Heating_is_on"
state: >-
{% set hcount=0 %}
{% for thermo in states.climate %}
{% if thermo.state == 'heat' %}
{% set hcount = hcount + 1 %}
{% endif %}
{% endfor %}
{{ hcount }}
I am very new in HA and any help will be appriciated.
I believe Rate Limiting is designed to limit updates to a maximum of once per second. In other words, it doesn’t default to updating once per second. Or, at least, that’s my understanding of how Rate Limiting works.