Multiple thermostats controlling one switch

I’m looking to to exactly what was asked here but the solution is not really a solution.

I have multiple rooms in my house, each with a TRVZB TRV on the radiator. I want each room to be able to ask for heat from the heater until the temperature sensor reaches its target.

If I configure multiple thermostats with the same real switch when two or more rooms ask for heat, the heat would be turned off when the first one reaches the target temp - I want to avoid this.

In my mind I need to:

  • Create a virtual switch for each room like switch.room1, switch.room2
  • Create a generic thermostat for each room climate.room1, climate.room2 which control their respective switches
  • Create a virtual template switch that turns on/off the real switch:
switch:
  - platform: template
    switches:
      combined_heater:
        value_template: >
          {{ is_state('climate.room1', 'heating')
             or is_state('climate.room2', 'heating') }}
        turn_on:
          service: switch.turn_on
          target:
            entity_id: switch.real_switch
        turn_off:
          service: switch.turn_off
          target:
            entity_id: switch.real_switch

This is not hard to do, but it seems too complicated. Does anyone know of a cleaner way to achieve this?

Thanks!

If you already have a real (or fake) switch for each generic thermostat you could just add all of those switches to a switch group.

A few updates back an option (All entities) was added to switch groups, if that option is disabled the group will show on if any of the switches in the group are on.

Then you just need a single automation on the switch group to copy the state of the group (off or on) to the real switch.

1 Like

I don’t have the switches yet, since I have a Salus thermostat connected in parallel with the Shelly ‘real’ one.

In your scenario I just replace combined_heater switch with a group.

thanks for the idea.

BTW, You can fake switches using MQTT, like I suggested in this post:

You may not need that, but I use it every now and then to get myself out of a jam.

1 Like