Avoiding that one of two thermostats turns off heating-boiler

Hi, I’m fairly new to HA but I’m slowly getting in to it. One obstacle I encountered is the following:

I have floor heating in my house with in total four splitters for the heating pipes in the floor. I have attached smart-relays that control a thermic motor on each heatingpipe-valve, and with the temperature sensors I installed in each room, I can control the heating in each room with multiple generic thermostats in HA.

So I have set up multiple generic thermostats, but the problem I encounter is that; when you have 2 thermostats, which both are asking the boiler to give hot water to the same splitter. When one of the thermostats reached his target temp it turns off the boiler relay, resulting in the other thermostat never reaching its target temp.

So my question is as follows; is it possible to set up a switch that won’t turn off when another thermostat still is in heating mode(demanding hot water from boiler)?

(I know there is a keep_alive option, but that wouldn’t work as my boiler has a 10 minute cooldown whenever heating-demand is turned off)

Thanks a lot for taking the time to read this, and maybe give me a solution :grimacing:

Ok, I figured it out on my own. For people who encounter this in the future I solved it as follows:

I simple made an automation with conditions which handles the switching of the heating source:

- id: wv_a_start
  alias: 'Start warmtevraag verdeler A'
  trigger:
#verdeler-kraan naar badkamer
    - platform: state
      entity_id: switch.badkamer_on_off
      from: 'off'
      to: 'on'
#verdeler-kraan naar slaapkamer
    - platform: state
      entity_id: switch.slaapkamer_679cb726_on_off
      from: 'off'
      to: 'on'
#start warmtevraag woonhuis_boven
  action:
    - service: switch.turn_on
      entity_id: switch.wv_woonhuis_boven

- id: wv_a_stop
  alias: 'Stop warmtevraag verdeler A'
  trigger:
    - platform: state
      entity_id: switch.badkamer_on_off
      from: 'on'
      to: 'off'
    - platform: state
      entity_id: switch.slaapkamer_679cb726_on_off
      from: 'on'
      to: 'off'
#check of beide thermostaten geen warmtevraag meer hebben
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: switch.badkamer_on_off
        state: 'off'
      - condition: state
        entity_id: switch.slaapkamer_679cb726_on_off
        state: 'off'
#stop warmtevraag woonhuis_boven
  action:
    - service: switch.turn_off
      entity_id: switch.wv_woonhuis_boven

You might like to check out Heating X2: Schedule Thermostats with Calendars.

The kit includes blueprints and a code generator to create all the YAML code for thermostat and zone control.

I solved the zone problem by

  1. A template sensor for each thermostat to determine if heat is demanded (set temperature is higher than ambient temperature)
  2. A group of these template sensors for each zone. The group is on if any one thermostat demands heat and off only if none do
  3. A simple automation that switches the zone valve on and off when the heat demand changes