Using virtual switches for single switch heater control

First question (assumedly of many).

I’ve got (what I assume) is a very common heating setup for the UK. One main loop from the boiler (that I’m controlling via a Shelly relay). I’ve got temp sensors in a few rooms and those rooms also have TRVs. Everything is reporting and working as expected. However because 3 zones all use the same heater switch, they’ll turn off the boiler when only one of them reaches temperature.

Ideally, the TRV closes but the loop stays on until all temps are met. From lots of googling I’m fairly certain I can do this with virtual switches, I’m just struggling to get it started.

Logic idea:
Lounge thermostat points to heater switch: virtual_sw_1
Office thermostat points to heater switch: virtual_sw_2
Bedroom thermostat points to heater switch: virtual_sw_3

All 3 virtual switches go in to a group, that group toggles the actual Shelly relay.

However, I have no clue really how to start with this, I’m very new to everything…

Ok I’ve managed to work this out.

So firstly, I made a bunch of input_booleans for the thermostats to use.

Input boolean: input_boolean.lounge_boiler_switch
Then in the thermostat I pointed that to be the heater element. Repeat this for each thermostat you have.

climate.yaml

# Main Zone Thermostat
- platform: generic_thermostat
  name: Lounge Thermostat
  heater: input_boolean.lounge_boiler_switch

Then I added them all to a group

groups.yaml

# Group fake boiler switches
group_master_boiler:
  name: Boiler Group Switch
  entities:
    - input_boolean.bedroom_boiler_switch
    - input_boolean.lounge_boiler_switch
    - input_boolean.xxx_boiler_switch
    - input_boolean.xxx_boiler_switch
    - input_boolean.xxx_boiler_switch
  all: false

Then you need an automation that when the group state changes it toggles the actual relay.

automations.yaml

- id: '1701518609248'
  alias: Turn on boiler
  description: ''
  trigger:
  - platform: state
    entity_id:
    - group.group_master_boiler
    from: 'off'
    to: 'on'
  condition: []
  action:
  - service: switch.turn_on
    data: {}
    target:
      device_id: 75503298d19820891bf07a80598d9194
  mode: single
- id: '1701518753439'
  alias: Turn off boiler
  description: ''
  trigger:
  - platform: state
    entity_id:
    - group.group_master_boiler
    from: 'on'
    to: 'off'
  condition: []
  action:
  - service: switch.turn_off
    data: {}
    target:
      device_id: 75503298d19820891bf07a80598d9194
  mode: single

Fun experience in learning how all this works and fairly simple!