I have created 5 template sensors to create entities to show the hvac_action (and then use Utility Meter to track time heating). They all work as expected.
I would like to combine the 5 sensors to create 1 sensor that will show heating if any of the rooms are heating. This one I cannot get working…
I have gotten as far as creating YAML that doesn’t break and the sensor ‘Heating Activity’ is created, though it doesn’t work / update if one of the rooms is heating or all of the rooms are idle.
Any suggestions would be much appreciated.
template:
#Template to get hvac_action as entity and create sensor to show heating if any room is heating
- sensor:
- name: Bedroom Heating Activity
state: "{{ state_attr('climate.bedroom', 'hvac_action') }}"
- sensor:
- name: Big Office Heating Activity
state: "{{ state_attr('climate.big_office', 'hvac_action') }}"
- sensor:
- name: Big Room Heating Activity
state: "{{ state_attr('climate.big_room', 'hvac_action') }}"
- sensor:
- name: Little Office Heating Activity
state: "{{ state_attr('climate.little_office', 'hvac_action') }}"
- sensor:
- name: Spare Room Heating Activity
state: "{{ state_attr('climate.spare_room', 'hvac_action') }}"
- sensor:
- name: Heating Activity
state: >-
{%- if (states('sensor.bedroom_heating_activity') or states('sensor.big_room_heating_activity') or states('sensor.big_office_heating_activity') or states('sensor.spare_room_heating_activity') or states('sensor.little_office_heating_activity'))==heating-%}heating{%- else -%}idle{%- endif -%}