Create another Template Sensor that applies the rules you defined.
- name: PT HVAC Activity
state: "{{ state_attr('climate.tstat_pt_thermostat', 'hvac_action') }}"
- name: PP HVAC Activity
state: "{{ state_attr('climate.tstat_pp_thermostat', 'hvac_action') }}"
- name: Flex Room HVAC Activity
state: "{{ state_attr('climate.tstat_flex_thermostat', 'hvac_action') }}"
- name: HVAC Activity
state: >
{% set hvac = [ states('sensor.pt_hvac_activity'), states('sensor.pp_hvac_activity'), states('sensor.flex_room_hvac_activity') ] %}
{% if hvac | select('eq', 'heating') | list | count > 0 %}
heating
{% elif hvac | select('eq', 'cooling') | list | count > 0 %}
cooling
{% elif hvac | select('eq', 'idle') | list | count == 3 %}
idle
{% else %}
off
{% endif %}
I added a final else as a catchall in case the state of the thermostats, for some unforeseen reason, doesn’t match any of the three tests.