YAML advice for template syntax

Hi,
i have 2 heating systems and would like a status to show in a dashboard when one or both are heating…
I now have this in configuration.yaml

  • platform: template
    sensors:
    living_room_hvac_modes:
    value_template: “{{ state_attr(‘climate.living’, ‘hvac_action’) }}”

i want something like general_hvac_modes where i put Heating in when the climate.livingroom is heating or the climate.bathroom is heating, and if none are heating just put idle…
Any suggestions on code needed?

PS. Sorry for this question, but i’m a little bit new in yaml, and don’t find any examples to base this on…

Doesn’t Generic Thermostat do something like that?

Create a group of thermostats and you probably will have exactly what you are looking for. And can be used in cards directly.

Something like this:

groups:
  office_thermostats:
    name: Office - Thermostats (combined)
    entities:
      - climate.office_thermostat_1
      - climate.office_thermostat_2

Yes it will do…but i want to use the status of all on a status dashboard…

I can do this…but problem is that it will take over the state to the combined entity.
The state on these thermostats is off/on…but i really want the hvac_Status of the thermostats, because those state idle or heating…and i want to know when one of them is heating…

In this case you will have to create your own template climate entity. I never tried that, but maybe this custom integration is what you are looking for: