Central heating controls

Setting up my first HA config. I’ve ripped out my boiler controls and replaced them with a zigbee switch. I’ve installed zigbee TRVs onto all my radiators.

I have created two YAML scripts to fire up the boiler when the TRV demands, and stops the boiler when the TRV is satisfied. My TRVs I can set different temperatures by time of day, so in my study, I’ve got 20 degrees from 8-6 and 5 degrees the rest of the day - and the rest of my house, pretty much the opposite!

Challenge:

  1. I want to trigger the boiler to start when ANY of my TRVs demands (OR clause). I’m not sure if having multiple triggers achieves this, or if these become an AND clause
  2. I want to stop the boiler when ALL of my TRVs are satisfied. I can only build the AND clause in the condition section, but my understanding is that nothing actually initiates the trigger.
  3. Bonus - I want to assume a TRV is satisfied if it becomes disconnected. My zigbee network is currently not overly reliable to the far corners of the house, and TRVs often disconnect.
alias: Start Heating
description: Turns heating on in study
trigger:
  - platform: numeric_state
    entity_id: climate.study_radiator
    value_template: "{{ state.attributes.temperature - state.attributes.current_temperature }}"
    above: 2
  - platform: numeric_state
    enabled: false
    entity_id: climate.kitchen_table_radiator
    above: 3
    value_template: "{{ state.attributes.temperature - state.attributes.current_temperature }}"
condition: []
action:
  - type: turn_on
    device_id: 1afdc2521ec138cf8b7c0285a9c1411e
    entity_id: switch.central_heating_switch_1
    domain: switch
mode: single
alias: Stop heating
description: Turns heating off in study
trigger:
  - platform: numeric_state
    entity_id: climate.study_radiator
    value_template: "{{ state.attributes.temperature - state.attributes.current_temperature }}"
    below: 0
condition: []
action:
  - type: turn_off
    device_id: 1afdc2521ec138cf8b7c0285a9c1411e
    entity_id: switch.central_heating_switch_1
    domain: switch
mode: single