Multi-zone Heating with scheduling

Set up my first home automation using Home assistant using mostly code borrowed from this forum. Really need to thank @gt4020 Giovanni for the code to set up schedule’s. Currently have 2 heating zones working and boiler control. Plan on adding hot water as an extra zone from boiler but also solar water and electric immersion heater, need to acquire more sensors and switches.

Current features:
3 weekly times schedules with 8 segments per day + night temp = 9
Boost timer with temperature and time selection.
Zone temperature settings.
Zone valve protection, de-energize when heat is off.

Planned features:
Separate hot water Zone
Solar hot water monitoring
Immersion heater control
Humidity sensors in bathrooms with fan control

3 Likes

config.yaml

# Modified from: gt4020 Giovanni https://community.home-assistant.io/t/yahwt-heating-week-timer/148789
#--------------Create Boiler thermostat-------------------------------
#virtual thermostat using sensor value from downstairs thermostat and boiler switch.
climate:
- platform: generic_thermostat
  name: HA thermo
  heater: switch.700574032462ab3b7e49 #Boiler Switch
  target_sensor: sensor.current_temp #Boiler room sensor currently reading downstairs zone thermostat
  min_temp: 10
  max_temp: 24
  ac_mode: false
  # target_temp: 17
  cold_tolerance: 0.3
  hot_tolerance: 0
  min_cycle_duration:
    seconds: 5
  keep_alive:
    minutes: 1
  # initial_hvac_mode: "off"
  # away_temp: 12
  precision: 0.1
  
binary_sensor:  
  - platform: workday
    country: 'IE' #country code important for holiday schedules etc.
    name: 'workday_today'
    workdays: [mon, tue, wed, thu, fri, sat]
    excludes: [sun, holiday]

#---------------------------input temperatures--------------------------
input_number:  # input number 
#night temps
  t0_temp:  
    name: T night
    min: 10
    max: 20
    step: 0.5 
    mode: box
    icon: mdi:home-thermometer     
    
#weekday temps
  t1_work:  # temperature preset T1
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank
    
  t2_work:  # temperature preset T2
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank

  t3_work:  # temperature preset T3
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank

  t4_work:  # temperature preset T4
    name: °C
    min: 10
    max: 25
    step: 0.5
    mode: box
    icon: mdi:blank
    
  t5_work:  # temperature preset T5
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank
    
  t6_work:  # temperature preset T6
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank
    
  t7_work:  # temperature preset T7
    name: °C
    min: 10
    max: 25
    step: 0.5
    mode: box
    icon: mdi:blank
    
  t8_work:  # temperature preset T8
    name: °C
    min: 10
    max: 25
    step: 0.5
    mode: box
    icon: mdi:blank

#sat temps
  t1_sat:  # temperature preset T1
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank
    
  t2_sat:  # temperature preset T2
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank

  t3_sat:  # temperature preset T3
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank

  t4_sat:  # temperature preset T4
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank
    
  t5_sat:  # temperature preset T5
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank
  
  t6_sat:  # temperature preset T6
    name: °C
    min: 10
    max: 25
    step: 0.5
    mode: box
    icon: mdi:blank 
    
  t7_sat:  # temperature preset T7
    name: °C
    min: 10
    max: 25
    step: 0.5
    mode: box
    icon: mdi:blank
    
  t8_sat:  # temperature preset T8
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank
    
#Sunday/Holiday temps
  t1_sun:  # temperature preset T1
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank
    
  t2_sun:  # temperature preset T2
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank

  t3_sun:  # temperature preset T3
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank 

  t4_sun:  # temperature preset T4
    name: °C
    min: 10
    max: 25
    step: 0.1 
    mode: box
    icon: mdi:blank
    
  t5_sun:  # temperature preset T5
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank 
    
  t6_sun:  # temperature preset T6
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank
    
  t7_sun:  # temperature preset T7
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank
    
  t8_sun:  # temperature preset T8
    name: °C
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:blank

#zone temperature inputs
  temp_up:  # temperature preset Upstairs
    name: Temp Upstairs Timer
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:home-thermometer-outline

  temp_down:  # temperature preset Downstairs
    name: Temp Downstairs Timer
    min: 10
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:home-thermometer-outline

#Boost timer settings
  boiler_timer:  # set time for boost heating start
    name: Minutes
    initial: 60
    min: 10
    max: 240
    step: 1 
    mode: box
    icon: mdi:timer-sand
    
  temp_boost:  # temperature preset boost
    name: Temp Boost
    min: 5
    max: 25
    step: 0.5 
    mode: box
    icon: mdi:home-thermometer-outline
    
#-----------------boolean switches-------------    
input_boolean:
  heating_master: # if ON enable heating week timer
    name: Heating Auto timer
    icon: mdi:av-timer
    
  switch_boiler_timer: # if ON start heating for xxx minutes (input_number.boiler_timer). Override week timer.
    name: Boost Timer
    initial: off
    icon: mdi:radiator
    
#-----------------------------sensors----------------------------------------------------------------
#weather sensor    
sensor:
  - platform: yr
    name: Weather
    forecast: 1
    monitored_conditions:
      - temperature
#time sensor
  - platform: time_date
    display_options:
      - 'time'
      - 'date'
      - 'date_time'
      - 'date_time_iso'
      - 'time_date'
      - 'time_utc'
      - 'beat'

#program 8 time slots for weekday, saturday and sunday/holiday
  - platform: template
    sensors:
      heating_program:
        friendly_name: "Heating Program"
        value_template: >-  # ok 141119
          {% set t = states('sensor.time') %}
          {% if is_state('binary_sensor.workday_today', 'on') %}
            {% if now().weekday() in (0,1,2,3,4) %}
              {%   if states('input_datetime.p1_weekday_on') <= t <= states('input_datetime.p2_weekday_on') %} p1_weekday
              {% elif states('input_datetime.p2_weekday_on') <= t <= states('input_datetime.p3_weekday_on') %} p2_weekday
              {% elif states('input_datetime.p3_weekday_on') <= t <= states('input_datetime.p4_weekday_on') %} p3_weekday 
              {% elif states('input_datetime.p4_weekday_on') <= t <= states('input_datetime.p5_weekday_on') %} p4_weekday
              {% elif states('input_datetime.p5_weekday_on') <= t <= states('input_datetime.p6_weekday_on') %} p5_weekday
              {% elif states('input_datetime.p6_weekday_on') <= t <= states('input_datetime.p7_weekday_on') %} p6_weekday
              {% elif states('input_datetime.p7_weekday_on') <= t <= states('input_datetime.p8_weekday_on') %} p7_weekday
              {% elif states('input_datetime.p8_weekday_on') <= t < '23:59' %} p8_weekday
              {% elif '00:00' <= t <= states('input_datetime.p1_weekday_on') %} p0_weekday
              {% else %} error
              {% endif %}
            {% else %}
              {%   if states('input_datetime.p1_saturday_on') <= t <= states('input_datetime.p2_saturday_on') %} p1_saturday
              {% elif states('input_datetime.p2_saturday_on') <= t <= states('input_datetime.p3_saturday_on') %} p2_saturday
              {% elif states('input_datetime.p3_saturday_on') <= t <= states('input_datetime.p4_saturday_on') %} p3_saturday 
              {% elif states('input_datetime.p4_saturday_on') <= t <= states('input_datetime.p5_saturday_on') %} p4_saturday
              {% elif states('input_datetime.p5_saturday_on') <= t <= states('input_datetime.p6_saturday_on') %} p5_saturday
              {% elif states('input_datetime.p6_saturday_on') <= t <= states('input_datetime.p7_saturday_on') %} p6_saturday
              {% elif states('input_datetime.p7_saturday_on') <= t <= states('input_datetime.p8_saturday_on') %} p7_saturday
              {% elif states('input_datetime.p8_saturday_on') <= t <= '23:59' %} p8_saturday
              {% elif '00:00' <= t <= states('input_datetime.p1_saturday_on') %} p0_saturday
              {% else %} error
              {% endif %}
            {% endif %}
          {% else %}
            {%   if states('input_datetime.p1_holiday_on') <= t <= states('input_datetime.p2_holiday_on') %} p1_holiday
            {% elif states('input_datetime.p2_holiday_on') <= t <= states('input_datetime.p3_holiday_on') %} p2_holiday
            {% elif states('input_datetime.p3_holiday_on') <= t <= states('input_datetime.p4_holiday_on') %} p3_holiday 
            {% elif states('input_datetime.p4_holiday_on') <= t <= states('input_datetime.p5_holiday_on') %} p4_holiday
            {% elif states('input_datetime.p5_holiday_on') <= t <= states('input_datetime.p6_holiday_on') %} p5_holiday
            {% elif states('input_datetime.p6_holiday_on') <= t <= states('input_datetime.p7_holiday_on') %} p6_holiday
            {% elif states('input_datetime.p7_holiday_on') <= t <= states('input_datetime.p8_holiday_on') %} p7_holiday
            {% elif states('input_datetime.p8_holiday_on') <= t <= '23:59' %} p8_holiday
            {% elif '00:00' <= t <= states('input_datetime.p1_holiday_on') %} p0_holiday
            {% else %} error
            {% endif %}
          {% endif %}



#define temperature sensors                
  - platform: template  
    sensors:
      current_temp:
        value_template: "{{ states.climate.bfb4fbcb25305e7371a3yn.attributes.current_temperature }}" #read downstairs temp as a sensor
      upstairs_temp:
        value_template: "{{ states.climate.bf0dca95cb90411960fl8n.attributes.current_temperature }}" #read upstairs temp as a sensor
      hvac_temperature_knob:
        value_template: "{{ states.climate.ha_thermo.attributes.temperature }}" #read boler stat temp as a sensor

        
#---------------------------------Time inputs------------------------------------------------------        
input_datetime:
  p1_weekday_on:
    name: P1
    has_time: true
    #initial: '06:00:00'
    icon: mdi:clock-start   
    
  p2_weekday_on:
    name: P2
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end     
    
  p3_weekday_on:
    name: P3
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end       
  
  p4_weekday_on:
    name: P4
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end
    
  p5_weekday_on:
    name: P5
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end  
    
  p6_weekday_on:
    name: P6
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end  

  p7_weekday_on:
    name: P7
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end
   
  p8_weekday_on:
    name: P8
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end
    
  p1_saturday_on:
    name: P1
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-start   
    
  p2_saturday_on:
    name: P2
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end     
    
  p3_saturday_on:
    name: P3
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end       
  
  p4_saturday_on:
    name: P4
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end 
  
  p5_saturday_on:
    name: P5
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end   

  p6_saturday_on:
    name: P6 
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end  

  p7_saturday_on:
    name: P7
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end

  p8_saturday_on:
    name: P8
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end

  p1_holiday_on:
    name: P1
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-start   
    
  p2_holiday_on:
    name: P2
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end     
    
  p3_holiday_on:
    name: P3
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end       
  
  p4_holiday_on:
    name: P4
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end
    
  p5_holiday_on:
    name: P5
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end

  p6_holiday_on:
    name: P6
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end    

  p7_holiday_on:
    name: P7
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end

  p8_holiday_on:
    name: P8
    has_time: true
    #initial: '10:00:00'
    icon: mdi:clock-end
1 Like

automations.yaml

#---------------Boost--------------------------------
- alias: boiler timed on #boost timer on
  trigger:
  - platform: state
    entity_id: input_boolean.switch_boiler_timer
    to: 'on'
  action:
  - service: input_boolean.turn_off
    entity_id: input_boolean.switch_heating_lock_timer
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: '{{ states.input_number.temp_boost.state }}'
  id: 26cdd0087f934e38b4cdf050e6df5031
- alias: boiler timed off #Boost timer off
  trigger:
  - platform: state
    entity_id: input_boolean.switch_boiler_timer
    to: 'off'
  - platform: state
    entity_id: input_boolean.switch_boiler_timer
    to: 'on'
    for:
      minutes: '{{ states.input_number.boiler_timer.state | int }}'
  action:
  - service: input_boolean.turn_off
    entity_id: input_boolean.switch_boiler_timer
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: '{{ states.input_number.t0_temp.state }}'
  id: e08c0d734ef24fcc97e04643a71b60b1
#----------------------week timer------------------------------------
- alias: weektimer_program
  trigger:
  - platform: state
    entity_id: sensor.heating_program
  condition:
  - condition: state
    entity_id: input_boolean.heating_master
    state: 'on'
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: >-
           {% if is_state('sensor.heating_program', 'p1_weekday') %} {{ states.input_number.t1_work.state }}
           {% elif is_state('sensor.heating_program', 'p2_weekday') %} {{ states.input_number.t2_work.state }}
           {% elif is_state('sensor.heating_program', 'p3_weekday') %} {{ states.input_number.t3_work.state }}
           {% elif is_state('sensor.heating_program', 'p4_weekday') %} {{ states.input_number.t4_work.state }}
           {% elif is_state('sensor.heating_program', 'p5_weekday') %} {{ states.input_number.t5_work.state }}
           {% elif is_state('sensor.heating_program', 'p6_weekday') %} {{ states.input_number.t6_work.state }}
           {% elif is_state('sensor.heating_program', 'p7_weekday') %} {{ states.input_number.t7_work.state }}
           {% elif is_state('sensor.heating_program', 'p8_weekday') %} {{ states.input_number.t8_work.state }}
           {% elif is_state('sensor.heating_program', 'p0_weekday') %} {{ states.input_number.t0_temp.state }}
           
           {% elif is_state('sensor.heating_program', 'p1_saturday') %} {{ states.input_number.t1_sat.state }}
           {% elif is_state('sensor.heating_program', 'p2_saturday') %} {{ states.input_number.t2_sat.state }}
           {% elif is_state('sensor.heating_program', 'p3_saturday') %} {{ states.input_number.t3_sat.state }}
           {% elif is_state('sensor.heating_program', 'p4_saturday') %} {{ states.input_number.t4_sat.state }}
           {% elif is_state('sensor.heating_program', 'p5_saturday') %} {{ states.input_number.t5_sat.state }}
           {% elif is_state('sensor.heating_program', 'p6_saturday') %} {{ states.input_number.t6_sat.state }}
           {% elif is_state('sensor.heating_program', 'p7_saturday') %} {{ states.input_number.t7_sat.state }}
           {% elif is_state('sensor.heating_program', 'p8_saturday') %} {{ states.input_number.t8_sat.state }}
           {% elif is_state('sensor.heating_program', 'p0_saturday') %} {{ states.input_number.t0_temp.state }}
           
           {% elif is_state('sensor.heating_program', 'p1_holiday') %} {{ states.input_number.t1_sun.state }}
           {% elif is_state('sensor.heating_program', 'p2_holiday') %} {{ states.input_number.t2_sun.state }}
           {% elif is_state('sensor.heating_program', 'p3_holiday') %} {{ states.input_number.t3_sun.state }}
           {% elif is_state('sensor.heating_program', 'p4_holiday') %} {{ states.input_number.t4_sun.state }}
           {% elif is_state('sensor.heating_program', 'p5_holiday') %} {{ states.input_number.t5_sun.state }}
           {% elif is_state('sensor.heating_program', 'p6_holiday') %} {{ states.input_number.t6_sun.state }}
           {% elif is_state('sensor.heating_program', 'p7_holiday') %} {{ states.input_number.t7_sun.state }}
           {% elif is_state('sensor.heating_program', 'p8_holiday') %} {{ states.input_number.t8_sun.state }}
           {% elif is_state('sensor.heating_program', 'p0_holiday') %} {{ states.input_number.t0_temp.state }}
           {% endif %}
  id: c36e140dfbd04679bf7b4788fa4a6af9
  #--------------------------------------temperature lock----------------------------
- alias: temp_lock
  trigger:
  - platform: state
    entity_id: sensor.hvac_temperature_knob
  - platform: state
    entity_id: input_boolean.heating_master
    to: 'on'
  condition:
  - condition: state
    entity_id: input_boolean.switch_boiler_timer
    state: 'off'
  - condition: state
    entity_id: input_boolean.heating_master
    state: 'on'
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: >-
           {% if is_state('sensor.heating_program', 'p1_weekday') %} {{ states.input_number.t1_work.state }}
           {% elif is_state('sensor.heating_program', 'p2_weekday') %} {{ states.input_number.t2_work.state }}
           {% elif is_state('sensor.heating_program', 'p3_weekday') %} {{ states.input_number.t3_work.state }}
           {% elif is_state('sensor.heating_program', 'p4_weekday') %} {{ states.input_number.t4_work.state }}
           {% elif is_state('sensor.heating_program', 'p5_weekday') %} {{ states.input_number.t5_work.state }}
           {% elif is_state('sensor.heating_program', 'p6_weekday') %} {{ states.input_number.t6_work.state }}
           {% elif is_state('sensor.heating_program', 'p7_weekday') %} {{ states.input_number.t7_work.state }}
           {% elif is_state('sensor.heating_program', 'p8_weekday') %} {{ states.input_number.t8_work.state }}
           {% elif is_state('sensor.heating_program', 'p0_weekday') %} {{ states.input_number.t0_temp.state }}
           
           {% elif is_state('sensor.heating_program', 'p1_saturday') %} {{ states.input_number.t1_sat.state }}
           {% elif is_state('sensor.heating_program', 'p2_saturday') %} {{ states.input_number.t2_sat.state }}
           {% elif is_state('sensor.heating_program', 'p3_saturday') %} {{ states.input_number.t3_sat.state }}
           {% elif is_state('sensor.heating_program', 'p4_saturday') %} {{ states.input_number.t4_sat.state }}
           {% elif is_state('sensor.heating_program', 'p5_saturday') %} {{ states.input_number.t5_sat.state }}
           {% elif is_state('sensor.heating_program', 'p6_saturday') %} {{ states.input_number.t6_sat.state }}
           {% elif is_state('sensor.heating_program', 'p7_saturday') %} {{ states.input_number.t7_sat.state }}
           {% elif is_state('sensor.heating_program', 'p8_Saturday') %} {{ states.input_number.t8_sat.state }}
           {% elif is_state('sensor.heating_program', 'p0_saturday') %} {{ states.input_number.t0_temp.state }}
           
           {% elif is_state('sensor.heating_program', 'p1_holiday') %} {{ states.input_number.t1_sun.state }}
           {% elif is_state('sensor.heating_program', 'p2_holiday') %} {{ states.input_number.t2_sun.state }}
           {% elif is_state('sensor.heating_program', 'p3_holiday') %} {{ states.input_number.t3_sun.state }}
           {% elif is_state('sensor.heating_program', 'p4_holiday') %} {{ states.input_number.t4_sun.state }}
           {% elif is_state('sensor.heating_program', 'p5_holiday') %} {{ states.input_number.t5_sun.state }}
           {% elif is_state('sensor.heating_program', 'p6_holiday') %} {{ states.input_number.t6_sun.state }}
           {% elif is_state('sensor.heating_program', 'p7_holiday') %} {{ states.input_number.t7_sun.state }}
           {% elif is_state('sensor.heating_program', 'p8_holiday') %} {{ states.input_number.t8_sun.state }}
           {% elif is_state('sensor.heating_program', 'p0_holiday') %} {{ states.input_number.t0_temp.state }}
           {% endif %}
  id: 47141d0a7f8d420885cd15bc3cbb5888
  #------------------------------------valve protection, de-energize zone valves when boiler is off 
- id: '1577612881345'
  alias: valves on
  description: ''
  trigger:
  - entity_id: switch.700574032462ab3b7e49
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bf0dca95cb90411960fl8n
      temperature: '{{ states.input_number.temp_up.state }}'
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bfb4fbcb25305e7371a3yn
      temperature: '{{ states.input_number.temp_down.state }}'
- id: '1577612972092'
  alias: valves off
  description: ''
  trigger:
  - entity_id: switch.700574032462ab3b7e49
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bf0dca95cb90411960fl8n
      temperature: '{{ states.input_number.t0_temp.state }}'
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bfb4fbcb25305e7371a3yn
      temperature: '{{ states.input_number.t0_temp.state }}'

1 Like

Cards:

title: Home
views:
  - badges:
      - entity: sun.sun
        name: Day Light
      - entity: sensor.weather_temperature
        name: Outside °C
    cards:
      - cards:
          - entity: climate.ha_thermo
            name: Boiler
            type: thermostat
          - entities:
              - entity: input_boolean.switch_boiler_timer
              - entity: input_number.boiler_timer
                name: Minutes 1 - 120
              - entity: input_number.temp_boost
                name: Boost Temperature °C
              - entity: input_boolean.heating_master
                name: Heating Schedule On/Off
            type: entities
        type: vertical-stack
      - cards:
          - entity: sensor.upstairs_temp
            max: 30
            min: 0
            name: Upstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entity: sensor.current_temp
            max: 30
            min: 0
            name: Downstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entities:
              - entity: input_number.temp_up
                name: Max Upstairs Temperature °C
              - entity: input_number.temp_down
                name: Max Downstairs Temperature °C
              - entity: input_number.t0_temp
                name: Min Night Temperature °C
            show_header_toggle: false
            type: entities
        type: vertical-stack
    icon: 'mdi:fire'
    path: default_view
    title: Central Heating
  - badges: []
    cards:
      - entities:
          - entity: input_datetime.p1_weekday_on
          - entity: input_number.t1_work
          - entity: input_datetime.p2_weekday_on
          - entity: input_number.t2_work
          - entity: input_datetime.p3_weekday_on
          - entity: input_number.t3_work
          - entity: input_datetime.p4_weekday_on
          - entity: input_number.t4_work
          - entity: input_datetime.p5_weekday_on
          - entity: input_number.t5_work
          - entity: input_datetime.p6_weekday_on
          - entity: input_number.t6_work
          - entity: input_datetime.p7_weekday_on
          - entity: input_number.t7_work
          - entity: input_datetime.p8_weekday_on
          - entity: input_number.t8_work
        show_header_toggle: false
        title: Weekday timer
        type: entities
      - entities:
          - entity: input_datetime.p1_saturday_on
          - entity: input_number.t1_sat
          - entity: input_datetime.p2_saturday_on
          - entity: input_number.t2_sat
          - entity: input_datetime.p3_saturday_on
          - entity: input_number.t3_sat
          - entity: input_datetime.p4_saturday_on
          - entity: input_number.t4_sat
          - entity: input_datetime.p5_saturday_on
          - entity: input_number.t5_sat
          - entity: input_datetime.p6_saturday_on
          - entity: input_number.t6_sat
          - entity: input_datetime.p7_saturday_on
          - entity: input_number.t7_sat
          - entity: input_datetime.p8_saturday_on
          - entity: input_number.t8_sat
        show_header_toggle: false
        title: Saturday timer
        type: entities
      - entities:
          - entity: input_datetime.p1_holiday_on
          - entity: input_number.t1_sun
          - entity: input_datetime.p2_holiday_on
          - entity: input_number.t2_sun
          - entity: input_datetime.p3_holiday_on
          - entity: input_number.t3_sun
          - entity: input_datetime.p4_holiday_on
          - entity: input_number.t4_sun
          - entity: input_datetime.p5_holiday_on
          - entity: input_number.t5_sun
          - entity: input_datetime.p6_holiday_on
          - entity: input_number.t6_sun
          - entity: input_datetime.p7_holiday_on
          - entity: input_number.t7_sun
          - entity: input_datetime.p8_holiday_on
          - entity: input_number.t8_sun
        show_header_toggle: false
        title: Sunday/Hol Timer
        type: entities
    icon: 'mdi:clock'
    path: misc
    title: CH Schedule
  - badges: []
    cards:
      - entity: weather.home
        type: weather-forecast
      - entities:
          - entity: switch.700574032462ab3b7e49
            icon: 'mdi:fire'
          - entity: sensor.current_temp
            icon: 'mdi:thermometer'
            name: Downstairs
          - entity: sensor.upstairs_temp
            icon: 'mdi:thermometer'
            name: Upstairs
        show_name: true
        show_state: true
        type: glance
      - cards:
          - entity: sensor.upstairs_temp
            max: 30
            min: 0
            name: Upstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entity: sensor.current_temp
            max: 30
            min: 0
            name: Downstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
        type: vertical-stack
      - entity: sensor.weather_temperature
        max: 35
        min: -20
        name: Outside Temp
        severity:
          green: 14
          red: 22
          yellow: 18
        theme: default
        type: gauge
      - entities:
          - entity: switch.700574032462ab3b7e49
          - entity: climate.bf0dca95cb90411960fl8n
          - entity: climate.bfb4fbcb25305e7371a3yn
          - entity: sensor.weather_temperature
        hours_to_show: 24
        refresh_interval: 0
        type: history-graph
    icon: 'mdi:home-thermometer'
    panel: false
    path: zones
    title: Temp Sensors
1 Like

This looks very interesting to me. But I’m still reading through it to try an understand it!

Is there a point where the target_sensor: on the generic_thermostat is switched to/from upstairs_temp: or am I miss understanding on how your zones are used and affected by the schedule?

I have a single heat source, but would like to schedule to uses downstairs temp sensors during the day and upstairs temp sensors during the night. Currently it’s just based on a ‘whole house average’ using min_max, type: mean on a Generic_thermostat.

I thought I was going to need two generic thermostats, but this looks like you’re only using one?

Hi Kob,

No you are not missing anything and this is very much a work in progress, first phase was to emulate how my heating system worked previously so at least others in the house were not cold and upset. So old system used mechanical timer on boiler and mechical thermostats on valves meaning boiler was often just dry cycling. The first improvment on my old system was thermostat control of Boiler.

Downstairs zone thermostat currently controls downstairs zone valve and upstairs controls upstairs zone valve. The scheduale sets the temperature at which the boiler starts/stops, the zone valves have mearly max temp values. I’ve also set zone valves to close everytime the boiler shutsdown as I recently had to replace all motor heads as valves were constantly under power when heating is off.

The generic thermostat reads the downstairs thermostat as a sensor and it controls the boiler. As we like the upstairs a few degrees cooler than downstairs physics looks after the rest, heat rises and upstairs has a lower set point so it heats quicker and turns off long befor downstairs reaches temperature. We don’t heat the house at night as upstairs stays warm long enough and house is well insulated, but the heating will come on if temp falls below the set night time value if it is very cold. (hasn’t happened yet and its about -4 outside the last few nights). Don’t know how well this would work for you as it will depend on your climate and level of insulation.

I’m sure you could call heating based on any number of temp sensors using some logic with “or” statements. Like I said its very much work in progress, at the moment the house remains a comfortable temperature all day with the boiler cycling less than it did on old system, as a consequence my hot water is now warm water so I will be adding new sensors for water tank this week and providing some new code to ensure enough hot water is available.

Added sensors to Hot Water tank, and setup an Immersion Heater Boost program to top up Hot water if not enough is produced by Central Heating or Solar panels by a set time in the evening.

config.ymal

# Modified from: gt4020 Giovanni https://community.home-assistant.io/t/yahwt-heating-week-timer/148789
#--------------Create Boiler thermostat-------------------------------
#virtual thermostat using sensor value from downstairs thermostat and boiler switch.
climate:
- platform: generic_thermostat
  name: HA thermo
  heater: switch.700574032462ab3b7e49 #Boiler Switch
  target_sensor: sensor.current_temp #Boiler room sensor currently reading downstairs zone thermostat
  min_temp: 10
  max_temp: 24
  ac_mode: false
  # target_temp: 17
  cold_tolerance: 0.3
  hot_tolerance: 0
  min_cycle_duration:
    seconds: 5
  keep_alive:
    minutes: 1
  # initial_hvac_mode: "off"
  # away_temp: 12
  precision: 0.1
  
  
#Immersion Thermostat
- platform: generic_thermostat
  name: HW thermostat
  heater: switch.bfd019f305520a0591hgke #Immersion Switch
  target_sensor: sensor.temperature_sensor_31_0 #HW Boiler sensor
  min_temp: 0
  max_temp: 65
  ac_mode: false
  # target_temp: 17
  cold_tolerance: 0.3
  hot_tolerance: 0
  min_cycle_duration:
    seconds: 5
  keep_alive:
    minutes: 1
  # initial_hvac_mode: "off"
  # away_temp: 12
  precision: 0.1
  
binary_sensor:  
  - platform: workday
    country: 'IE'
    name: 'workday_today'
    workdays: [mon, tue, wed, thu, fri, sat]
    excludes: [sun, holiday]

#---------------------------input temperatures--------------------------
input_number:  # input number 
#night temps
  t0_temp:  
    name: T night
    min: 10
    max: 20
    step: 0.5
    initial: 16
    mode: box
    icon: mdi:home-thermometer     
    
#weekday temps
  t1_work:  # temperature preset T1
    name: °C
    min: 10
    max: 25
    step: 0.5 
    initial: 22
    mode: box
    icon: mdi:blank
    
  t2_work:  # temperature preset T2
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 18
    mode: box
    icon: mdi:blank

  t3_work:  # temperature preset T3
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 20
    mode: box
    icon: mdi:blank

  t4_work:  # temperature preset T4
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank
    
  t5_work:  # temperature preset T5
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 20 
    mode: box
    icon: mdi:blank
    
  t6_work:  # temperature preset T6
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank
    
  t7_work:  # temperature preset T7
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank
    
  t8_work:  # temperature preset T8
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 18
    mode: box
    icon: mdi:blank

#sat temps
  t1_sat:  # temperature preset T1
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank
    
  t2_sat:  # temperature preset T2
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 18
    mode: box
    icon: mdi:blank

  t3_sat:  # temperature preset T3
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 20
    mode: box
    icon: mdi:blank

  t4_sat:  # temperature preset T4
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank
    
  t5_sat:  # temperature preset T5
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 20
    mode: box
    icon: mdi:blank
  
  t6_sat:  # temperature preset T6
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank 
    
  t7_sat:  # temperature preset T7
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank
    
  t8_sat:  # temperature preset T8
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 18
    mode: box
    icon: mdi:blank
    
#Sunday/Holiday temps
  t1_sun:  # temperature preset T1
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank
    
  t2_sun:  # temperature preset T2
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 18
    mode: box
    icon: mdi:blank

  t3_sun:  # temperature preset T3
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 20
    mode: box
    icon: mdi:blank 

  t4_sun:  # temperature preset T4
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank
    
  t5_sun:  # temperature preset T5
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 20
    mode: box
    icon: mdi:blank 
    
  t6_sun:  # temperature preset T6
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank
    
  t7_sun:  # temperature preset T7
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:blank
    
  t8_sun:  # temperature preset T8
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 18
    mode: box
    icon: mdi:blank
    
#immersion heater
  immersion_temp:
    name: Immersion °C
    min: 30
    max: 65
    step: 0.5
    initial: 50
    mode: box
    icon: mdi:hot-tub
    
  immersion_timer:  # set time for immersion heater
    name: Minutes
    initial: 60
    min: 10
    max: 120
    step: 1 
    mode: box
    icon: mdi:timer-sand

#zone temperature inputs
  temp_up:  # temperature preset Upstairs
    name: Temp Upstairs Timer
    min: 10
    max: 25
    step: 0.5
    initial: 20
    mode: box
    icon: mdi:home-thermometer-outline

  temp_down:  # temperature preset Downstairs
    name: Temp Downstairs Timer
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:home-thermometer-outline

#Boost timer settings
  boiler_timer:  # set time for boost heating start
    name: Minutes
    initial: 60
    min: 10
    max: 120
    step: 1 
    mode: box
    icon: mdi:timer-sand
    
  temp_boost:  # temperature preset boost
    name: Temp Boost
    min: 10
    max: 25
    step: 0.5
    initial: 22
    mode: box
    icon: mdi:home-thermometer-outline
    
#-----------------boolean switches-------------    
input_boolean:
  heating_master: # if ON enable heating week timer
    name: Heating Auto timer
    icon: mdi:av-timer
    
  switch_boiler_timer: # if ON start heating for xxx minutes (input_number.boiler_timer). Override week timer.
    name: Boost Timer
    initial: off
    icon: mdi:radiator
    
  switch_immersion_timer:
    name: Immersion timer
    initial: off
    icon: mdi:hot-tub
    
#-----------------------------sensors----------------------------------------------------------------
#weather sensor    
sensor:
  - platform: yr
    name: Weather
    forecast: 1
    monitored_conditions:
      - temperature
#time sensor
  - platform: time_date
    display_options:
      - 'time'
      - 'date'
      - 'date_time'
      - 'date_time_iso'
      - 'time_date'
      - 'time_utc'
      - 'beat'

#program 8 time slots for weekday, saturday and sunday/holiday
  - platform: template
    sensors:
      heating_program:
        friendly_name: "Heating Program"
        value_template: >-  # ok 141119
          {% set t = states('sensor.time') %}
          {% if is_state('binary_sensor.workday_today', 'on') %}
            {% if now().weekday() in (0,1,2,3,4) %}
              {%   if states('input_datetime.p1_weekday_on') <= t <= states('input_datetime.p2_weekday_on') %} p1_weekday
              {% elif states('input_datetime.p2_weekday_on') <= t <= states('input_datetime.p3_weekday_on') %} p2_weekday
              {% elif states('input_datetime.p3_weekday_on') <= t <= states('input_datetime.p4_weekday_on') %} p3_weekday 
              {% elif states('input_datetime.p4_weekday_on') <= t <= states('input_datetime.p5_weekday_on') %} p4_weekday
              {% elif states('input_datetime.p5_weekday_on') <= t <= states('input_datetime.p6_weekday_on') %} p5_weekday
              {% elif states('input_datetime.p6_weekday_on') <= t <= states('input_datetime.p7_weekday_on') %} p6_weekday
              {% elif states('input_datetime.p7_weekday_on') <= t <= states('input_datetime.p8_weekday_on') %} p7_weekday
              {% elif states('input_datetime.p8_weekday_on') <= t < '23:59' %} p8_weekday
              {% elif '00:00' <= t <= states('input_datetime.p1_weekday_on') %} p0_weekday
              {% else %} error
              {% endif %}
            {% else %}
              {%   if states('input_datetime.p1_saturday_on') <= t <= states('input_datetime.p2_saturday_on') %} p1_saturday
              {% elif states('input_datetime.p2_saturday_on') <= t <= states('input_datetime.p3_saturday_on') %} p2_saturday
              {% elif states('input_datetime.p3_saturday_on') <= t <= states('input_datetime.p4_saturday_on') %} p3_saturday 
              {% elif states('input_datetime.p4_saturday_on') <= t <= states('input_datetime.p5_saturday_on') %} p4_saturday
              {% elif states('input_datetime.p5_saturday_on') <= t <= states('input_datetime.p6_saturday_on') %} p5_saturday
              {% elif states('input_datetime.p6_saturday_on') <= t <= states('input_datetime.p7_saturday_on') %} p6_saturday
              {% elif states('input_datetime.p7_saturday_on') <= t <= states('input_datetime.p8_saturday_on') %} p7_saturday
              {% elif states('input_datetime.p8_saturday_on') <= t <= '23:59' %} p8_saturday
              {% elif '00:00' <= t <= states('input_datetime.p1_saturday_on') %} p0_saturday
              {% else %} error
              {% endif %}
            {% endif %}
          {% else %}
            {%   if states('input_datetime.p1_holiday_on') <= t <= states('input_datetime.p2_holiday_on') %} p1_holiday
            {% elif states('input_datetime.p2_holiday_on') <= t <= states('input_datetime.p3_holiday_on') %} p2_holiday
            {% elif states('input_datetime.p3_holiday_on') <= t <= states('input_datetime.p4_holiday_on') %} p3_holiday 
            {% elif states('input_datetime.p4_holiday_on') <= t <= states('input_datetime.p5_holiday_on') %} p4_holiday
            {% elif states('input_datetime.p5_holiday_on') <= t <= states('input_datetime.p6_holiday_on') %} p5_holiday
            {% elif states('input_datetime.p6_holiday_on') <= t <= states('input_datetime.p7_holiday_on') %} p6_holiday
            {% elif states('input_datetime.p7_holiday_on') <= t <= states('input_datetime.p8_holiday_on') %} p7_holiday
            {% elif states('input_datetime.p8_holiday_on') <= t <= '23:59' %} p8_holiday
            {% elif '00:00' <= t <= states('input_datetime.p1_holiday_on') %} p0_holiday
            {% else %} error
            {% endif %}
          {% endif %}



#define temperature sensors                
  - platform: template  
    sensors:
      current_temp:
        value_template: "{{ states.climate.bfb4fbcb25305e7371a3yn.attributes.current_temperature }}" #read downstairs temp as a sensor
      upstairs_temp:
        value_template: "{{ states.climate.bf0dca95cb90411960fl8n.attributes.current_temperature }}" #read upstairs temp as a sensor
      hvac_temperature_knob:
        value_template: "{{ states.climate.ha_thermo.attributes.temperature }}" #read boler stat temp as a sensor

        
#---------------------------------Time inputs------------------------------------------------------        
input_datetime:
  p1_weekday_on:
    name: P1
    has_time: true
    initial: '06:00:00'
    icon: mdi:clock-start   
    
  p2_weekday_on:
    name: P2
    has_time: true
    initial: '09:00:00'
    icon: mdi:clock-end     
    
  p3_weekday_on:
    name: P3
    has_time: true
    initial: '13:00:00'
    icon: mdi:clock-end       
  
  p4_weekday_on:
    name: P4
    has_time: true
    initial: '15:00:00'
    icon: mdi:clock-end
    
  p5_weekday_on:
    name: P5
    has_time: true
    initial: '17:00:00'
    icon: mdi:clock-end  
    
  p6_weekday_on:
    name: P6
    has_time: true
    initial: '19:00:00'
    icon: mdi:clock-end  

  p7_weekday_on:
    name: P7
    has_time: true
    initial: '20:00:00'
    icon: mdi:clock-end
   
  p8_weekday_on:
    name: P8
    has_time: true
    initial: '22:00:00'
    icon: mdi:clock-end
    
  p1_saturday_on:
    name: P1
    has_time: true
    initial: '06:00:00'
    icon: mdi:clock-start   
    
  p2_saturday_on:
    name: P2
    has_time: true
    initial: '09:00:00'
    icon: mdi:clock-end     
    
  p3_saturday_on:
    name: P3
    has_time: true
    initial: '13:00:00'
    icon: mdi:clock-end       
  
  p4_saturday_on:
    name: P4
    has_time: true
    initial: '15:00:00'
    icon: mdi:clock-end 
  
  p5_saturday_on:
    name: P5
    has_time: true
    initial: '17:00:00'
    icon: mdi:clock-end   

  p6_saturday_on:
    name: P6 
    has_time: true
    initial: '19:00:00'
    icon: mdi:clock-end  

  p7_saturday_on:
    name: P7
    has_time: true
    initial: '20:00:00'
    icon: mdi:clock-end

  p8_saturday_on:
    name: P8
    has_time: true
    initial: '22:00:00'
    icon: mdi:clock-end

  p1_holiday_on:
    name: P1
    has_time: true
    initial: '06:00:00'
    icon: mdi:clock-start   
    
  p2_holiday_on:
    name: P2
    has_time: true
    initial: '09:00:00'
    icon: mdi:clock-end     
    
  p3_holiday_on:
    name: P3
    has_time: true
    initial: '13:00:00'
    icon: mdi:clock-end       
  
  p4_holiday_on:
    name: P4
    has_time: true
    initial: '15:00:00'
    icon: mdi:clock-end
    
  p5_holiday_on:
    name: P5
    has_time: true
    initial: '17:00:00'
    icon: mdi:clock-end

  p6_holiday_on:
    name: P6
    has_time: true
    initial: '19:00:00'
    icon: mdi:clock-end    

  p7_holiday_on:
    name: P7
    has_time: true
    initial: '20:00:00'
    icon: mdi:clock-end

  p8_holiday_on:
    name: P8
    has_time: true
    initial: '22:00:00'
    icon: mdi:clock-end
    
  immersion_auto_on:
    name: Imerrsion Auto On 
    has_time: true
    initial: '19:00:00'
    icon: mdi:clock-end

Automation.ymal

#-------------------Boost Automation-------------------------
- alias: boiler timed on
  trigger:
  - platform: state
    entity_id: input_boolean.switch_boiler_timer
    to: 'on'
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: '{{ states.input_number.temp_boost.state }}'
  id: 26cdd0087f934e38b4cdf050e6df5031
- alias: boiler timed off
  trigger:
  - platform: state
    entity_id: input_boolean.switch_boiler_timer
    to: 'off'
  - platform: state
    entity_id: input_boolean.switch_boiler_timer
    to: 'on'
    for:
      minutes: '{{ states.input_number.boiler_timer.state | int }}'
  action:
  - service: input_boolean.turn_off
    entity_id: input_boolean.switch_boiler_timer
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: '{{ states.input_number.t0_temp.state }}'
  id: e08c0d734ef24fcc97e04643a71b60b1
#---------------------------Week timer Automation----------------------
- alias: weektimer_program
  trigger:
  - platform: state
    entity_id: sensor.heating_program
  condition:
  - condition: state
    entity_id: input_boolean.heating_master
    state: 'on'
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: '{% if is_state(''sensor.heating_program'', ''p1_weekday'') %}
        {{ states.input_number.t1_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p2_weekday'') %} {{ states.input_number.t2_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p3_weekday'') %} {{ states.input_number.t3_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p4_weekday'') %} {{ states.input_number.t4_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p5_weekday'') %} {{ states.input_number.t5_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p6_weekday'') %} {{ states.input_number.t6_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p7_weekday'') %} {{ states.input_number.t7_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p8_weekday'') %} {{ states.input_number.t8_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p0_weekday'') %} {{ states.input_number.t0_temp.state }}

        {% elif is_state(''sensor.heating_program'', ''p1_saturday'') %} {{ states.input_number.t1_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p2_saturday'') %} {{ states.input_number.t2_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p3_saturday'') %} {{ states.input_number.t3_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p4_saturday'') %} {{ states.input_number.t4_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p5_saturday'') %} {{ states.input_number.t5_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p6_saturday'') %} {{ states.input_number.t6_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p7_saturday'') %} {{ states.input_number.t7_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p8_saturday'') %} {{ states.input_number.t8_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p0_saturday'') %} {{ states.input_number.t0_temp.state
        }}

        {% elif is_state(''sensor.heating_program'', ''p1_holiday'') %} {{ states.input_number.t1_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p2_holiday'') %} {{ states.input_number.t2_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p3_holiday'') %} {{ states.input_number.t3_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p4_holiday'') %} {{ states.input_number.t4_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p5_holiday'') %} {{ states.input_number.t5_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p6_holiday'') %} {{ states.input_number.t6_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p7_holiday'') %} {{ states.input_number.t7_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p8_holiday'') %} {{ states.input_number.t8_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p0_holiday'') %} {{ states.input_number.t0_temp.state
        }} {% endif %}'
  id: c36e140dfbd04679bf7b4788fa4a6af9
- alias: temp_lock
  trigger:
  - platform: state
    entity_id: sensor.hvac_temperature_knob
  - platform: state
    entity_id: input_boolean.heating_master
    to: 'on'
  condition:
  - condition: state
    entity_id: input_boolean.switch_boiler_timer
    state: 'off'
  - condition: state
    entity_id: input_boolean.heating_master
    state: 'on'
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: '{% if is_state(''sensor.heating_program'', ''p1_weekday'') %}
        {{ states.input_number.t1_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p2_weekday'') %} {{ states.input_number.t2_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p3_weekday'') %} {{ states.input_number.t3_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p4_weekday'') %} {{ states.input_number.t4_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p5_weekday'') %} {{ states.input_number.t5_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p6_weekday'') %} {{ states.input_number.t6_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p7_weekday'') %} {{ states.input_number.t7_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p8_weekday'') %} {{ states.input_number.t8_work.state }} {% elif is_state(''sensor.heating_program'',
        ''p0_weekday'') %} {{ states.input_number.t0_temp.state }}

        {% elif is_state(''sensor.heating_program'', ''p1_saturday'') %} {{ states.input_number.t1_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p2_saturday'') %} {{ states.input_number.t2_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p3_saturday'') %} {{ states.input_number.t3_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p4_saturday'') %} {{ states.input_number.t4_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p5_saturday'') %} {{ states.input_number.t5_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p6_saturday'') %} {{ states.input_number.t6_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p7_saturday'') %} {{ states.input_number.t7_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p8_Saturday'') %} {{ states.input_number.t8_sat.state
        }} {% elif is_state(''sensor.heating_program'', ''p0_saturday'') %} {{ states.input_number.t0_temp.state
        }}

        {% elif is_state(''sensor.heating_program'', ''p1_holiday'') %} {{ states.input_number.t1_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p2_holiday'') %} {{ states.input_number.t2_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p3_holiday'') %} {{ states.input_number.t3_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p4_holiday'') %} {{ states.input_number.t4_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p5_holiday'') %} {{ states.input_number.t5_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p6_holiday'') %} {{ states.input_number.t6_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p7_holiday'') %} {{ states.input_number.t7_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p8_holiday'') %} {{ states.input_number.t8_sun.state
        }} {% elif is_state(''sensor.heating_program'', ''p0_holiday'') %} {{ states.input_number.t0_temp.state
        }} {% endif %}'
  id: 47141d0a7f8d420885cd15bc3cbb5888
#-------------------------------Heat valve protection----------------
- id: '1577612881345'
  alias: valves on
  description: ''
  trigger:
  - entity_id: switch.700574032462ab3b7e49
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bf0dca95cb90411960fl8n
      temperature: '{{ states.input_number.temp_up.state }}'
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bfb4fbcb25305e7371a3yn
      temperature: '{{ states.input_number.temp_down.state }}'
- id: '1577612972092'
  alias: valves off
  description: ''
  trigger:
  - entity_id: switch.700574032462ab3b7e49
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bf0dca95cb90411960fl8n
      temperature: '{{ states.input_number.t0_temp.state }}'
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bfb4fbcb25305e7371a3yn
      temperature: '{{ states.input_number.t0_temp.state }}'
#---------------------Immersion Timer Automation------------------------------------
- id: '1578520268091'
  alias: Immersion Timer
  description: ''
  trigger:
  - entity_id: input_boolean.switch_immersion_timer
    platform: state
    to: 'on'
  condition: []
  action:
    - service: climate.set_hvac_mode
      entity_id: climate.hw_thermostat
      data_template:
        hvac_mode: "heat"
    - service: climate.set_temperature
      data_template:
        entity_id: climate.hw_thermostat
        temperature: '{{ states.input_number.immersion_temp.state }}'

- id: '1578521662871'
  alias: Immersion timed off
  trigger:
  - platform: state
    entity_id: input_boolean.switch_immersion_timer
    to: 'off'
  - platform: state
    entity_id: input_boolean.switch_immersion_timer
    to: 'on'
    for:
      minutes: '{{ states.input_number.immersion_timer.state | int }}'
  action:
  - service: input_boolean.turn_off
    entity_id: input_boolean.switch_immersion_timer
  - service: climate.set_hvac_mode
    entity_id: climate.hw_thermostat
    data:
      hvac_mode: "off"
- id: '1578653513704'
  alias: Immersion On Time
  description: ''
  trigger:
  - platform: template
    value_template: "{{ states.sensor.time.state == states.input_datetime.immersion_auto_on.state[0:5] }}"
  condition: []
  action:
  - entity_id: input_boolean.switch_immersion_timer
    service: input_boolean.turn_on

Lovelace Cards

title: Home
views:
  - badges:
      - entity: sun.sun
        name: Day Light
      - entity: sensor.weather_temperature
        name: Outside °C
      - entity: sensor.time
    cards:
      - cards:
          - entity: climate.ha_thermo
            name: Boiler
            type: thermostat
          - entities:
              - entity: input_boolean.switch_boiler_timer
                name: Boost Central Heating
              - entity: input_number.boiler_timer
                name: Minutes 10 - 120
              - entity: input_number.temp_boost
                name: Boost Temperature °C
            type: entities
        type: vertical-stack
      - cards:
          - entity: sensor.upstairs_temp
            max: 30
            min: 0
            name: Upstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entity: sensor.current_temp
            max: 30
            min: 0
            name: Downstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entities:
              - entity: input_boolean.heating_master
                name: Heating Schedule On/Off
              - entity: input_number.temp_up
                name: Max Upstairs Temperature °C
              - entity: input_number.temp_down
                name: Max Downstairs Temperature °C
              - entity: input_number.t0_temp
                name: Min Night Temperature °C
            show_header_toggle: false
            type: entities
        type: vertical-stack
    icon: 'mdi:fire'
    path: default_view
    title: Central Heating
  - badges: []
    cards:
      - entity: climate.hw_thermostat
        name: Immersion Heater
        type: thermostat
      - entities:
          - entity: input_boolean.switch_immersion_timer
          - entity: input_number.immersion_timer
            name: Minutes 10 - 120
          - entity: automation.immersion_on_time
            icon: 'mdi:hot-tub'
            name: Immersion Auto On
          - entity: input_datetime.immersion_auto_on
            icon: 'mdi:clock-outline'
            name: Immersion Auto On Time
          - entity: input_number.immersion_temp
            icon: 'mdi:thermometer'
        show_header_toggle: false
        type: entities
      - Name: Water Temp Sensors
        cards:
          - entity: sensor.temperature_sensor_32_0
            max: 100
            min: 0
            name: HW Taps Temp
            severity:
              green: 35
              red: 55
              yellow: 45
            theme: default
            type: gauge
          - entity: sensor.temperature_sensor_31_0
            max: 100
            min: 0
            name: HW Boiler Temp
            severity:
              green: 35
              red: 55
              yellow: 45
            theme: default
            type: gauge
          - entity: sensor.temperature_sensor_30_0
            max: 100
            min: 0
            name: HW Solar Temp
            severity:
              green: 35
              red: 55
              yellow: 45
            theme: default
            type: gauge
        title: Hot Water Temperatures
        type: vertical-stack
    path: hw
    title: HW
  - badges: []
    cards:
      - entities:
          - entity: input_datetime.p1_weekday_on
          - entity: input_number.t1_work
          - entity: input_datetime.p2_weekday_on
          - entity: input_number.t2_work
          - entity: input_datetime.p3_weekday_on
          - entity: input_number.t3_work
          - entity: input_datetime.p4_weekday_on
          - entity: input_number.t4_work
          - entity: input_datetime.p5_weekday_on
          - entity: input_number.t5_work
          - entity: input_datetime.p6_weekday_on
          - entity: input_number.t6_work
          - entity: input_datetime.p7_weekday_on
          - entity: input_number.t7_work
          - entity: input_datetime.p8_weekday_on
          - entity: input_number.t8_work
        show_header_toggle: false
        title: Weekday timer
        type: entities
      - entities:
          - entity: input_datetime.p1_saturday_on
          - entity: input_number.t1_sat
          - entity: input_datetime.p2_saturday_on
          - entity: input_number.t2_sat
          - entity: input_datetime.p3_saturday_on
          - entity: input_number.t3_sat
          - entity: input_datetime.p4_saturday_on
          - entity: input_number.t4_sat
          - entity: input_datetime.p5_saturday_on
          - entity: input_number.t5_sat
          - entity: input_datetime.p6_saturday_on
          - entity: input_number.t6_sat
          - entity: input_datetime.p7_saturday_on
          - entity: input_number.t7_sat
          - entity: input_datetime.p8_saturday_on
          - entity: input_number.t8_sat
        show_header_toggle: false
        title: Saturday timer
        type: entities
      - entities:
          - entity: input_datetime.p1_holiday_on
          - entity: input_number.t1_sun
          - entity: input_datetime.p2_holiday_on
          - entity: input_number.t2_sun
          - entity: input_datetime.p3_holiday_on
          - entity: input_number.t3_sun
          - entity: input_datetime.p4_holiday_on
          - entity: input_number.t4_sun
          - entity: input_datetime.p5_holiday_on
          - entity: input_number.t5_sun
          - entity: input_datetime.p6_holiday_on
          - entity: input_number.t6_sun
          - entity: input_datetime.p7_holiday_on
          - entity: input_number.t7_sun
          - entity: input_datetime.p8_holiday_on
          - entity: input_number.t8_sun
        show_header_toggle: false
        title: Sunday/Hol Timer
        type: entities
    icon: 'mdi:clock'
    path: misc
    title: CH Schedule
  - badges: []
    cards:
      - entity: weather.home
        type: weather-forecast
      - entity: sensor.weather_temperature
        max: 35
        min: -20
        name: Outside Temp
        severity:
          green: 14
          red: 22
          yellow: 18
        theme: default
        type: gauge
      - cards:
          - entity: sensor.upstairs_temp
            max: 30
            min: 0
            name: Upstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entity: sensor.current_temp
            max: 30
            min: 0
            name: Front Room Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entity: sensor.temperature_sensor_20_0
            max: 30
            min: 0
            name: Kitchen Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
          - entity: sensor.temperature_sensor_21_0
            max: 30
            min: 0
            name: Back Room Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
        title: Room Temperature
        type: vertical-stack
      - Name: Water Temp Sensors
        cards:
          - entity: sensor.temperature_sensor_32_0
            max: 100
            min: 0
            name: HW Taps Temp
            severity:
              green: 35
              red: 55
              yellow: 45
            theme: default
            type: gauge
          - entity: sensor.temperature_sensor_31_0
            max: 100
            min: 0
            name: HW Boiler Temp
            severity:
              green: 35
              red: 55
              yellow: 45
            theme: default
            type: gauge
          - entity: sensor.temperature_sensor_30_0
            max: 100
            min: 0
            name: HW Solar Temp
            severity:
              green: 35
              red: 55
              yellow: 45
            theme: default
            type: gauge
        title: Hot Water Temperature
        type: vertical-stack
      - entities:
          - entity: switch.700574032462ab3b7e49
            icon: 'mdi:fire'
          - entity: sensor.current_temp
            icon: 'mdi:home-thermometer-outline'
            name: Downstairs
          - entity: sensor.upstairs_temp
            icon: 'mdi:home-thermometer-outline'
            name: Upstairs
          - entity: switch.bfd019f305520a0591hgke
            icon: 'mdi:hot-tub'
            name: Immersion
        show_name: true
        show_state: true
        type: glance
      - entities:
          - entity: switch.700574032462ab3b7e49
          - entity: climate.bf0dca95cb90411960fl8n
          - entity: climate.bfb4fbcb25305e7371a3yn
          - entity: sensor.weather_temperature
          - entity: switch.bfd019f305520a0591hgke
            name: Immersion
        hours_to_show: 24
        refresh_interval: 0
        type: history-graph
    icon: 'mdi:home-thermometer'
    panel: false
    path: zones
    title: Temp Sensors

I’ve Completely redesigned the Scheduling Section
It now includes scheduling for each individual zone.

2 Likes

configuration.yaml

#---------------Heating Schedule version 2-----------------------------------------
#--------------Create Boiler thermostat-------------------------------
#virtual thermostat using sensor value from downstairs thermostat and boiler switch.
climate:
- platform: generic_thermostat
  name: HA thermo
  heater: switch.700574032462ab3b7e49 #Boiler Switch
  target_sensor: sensor.current_temp #Boiler room sensor currently reading downstairs zone thermostat
  min_temp: 10
  max_temp: 24
  ac_mode: false
  # target_temp: 17
  cold_tolerance: 0.3
  hot_tolerance: 0
  min_cycle_duration:
    seconds: 5
  keep_alive:
    minutes: 1
  # initial_hvac_mode: "off"
  # away_temp: 12
  precision: 0.1
  
  
#Immersion Thermostat
- platform: generic_thermostat
  name: HW thermostat
  heater: switch.bfd019f305520a0591hgke #Immersion Switch
  target_sensor: sensor.temperature_sensor_31_0 #HW Boiler sensor
  min_temp: 0
  max_temp: 65
  ac_mode: false
  # target_temp: 17
  cold_tolerance: 0.3
  hot_tolerance: 0
  min_cycle_duration:
    seconds: 5
  keep_alive:
    minutes: 1
  # initial_hvac_mode: "off"
  # away_temp: 12
  precision: 0.1
  
binary_sensor:  
  - platform: workday
    country: 'IE'
    name: 'workday_today'
    workdays: [mon, tue, wed, thu, fri, sat]
    excludes: [sun, holiday]

#---------------------------input temperatures--------------------------
input_number:  # input number 

#-------------------------Zone Temperatures---------------------------------
  t1_upstairs:
    name: T1 Upstairs
    min: 10
    max: 22
    step: 0.5
    initial: 20
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t1_sitting_room:
    name: T1 Sitting Room
    min: 10
    max: 22
    step: 0.5
    initial: 21
    mode: box
    icon: mdi:home-thermometer-outline 
    
  t1_hot_water:
    name: T1 Hot Water
    min: 10
    max: 55
    step: 0.5
    initial: 45
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t2_upstairs:
    name: T2 Upstairs
    min: 10
    max: 22
    step: 0.5
    initial: 19
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t2_sitting_room:
    name: T2 Sitting Room
    min: 10
    max: 22
    step: 0.5
    initial: 21
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t2_hot_water:
    name: T2 Hot Water
    min: 10
    max: 55
    step: 0.5
    initial: 45
    mode: box
    icon: mdi:home-thermometer-outline  

  t3_upstairs:
    name: T3 Upstairs
    min: 10
    max: 22
    step: 0.5
    initial: 19
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t3_sitting_room:
    name: T3 Sitting Room
    min: 10
    max: 22
    step: 0.5
    initial: 21
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t3_hot_water:
    name: T3 Hot Water
    min: 10
    max: 55
    step: 0.5
    initial: 45
    mode: box
    icon: mdi:home-thermometer-outline  

  t4_upstairs:
    name: T4 Upstairs
    min: 10
    max: 22
    step: 0.5
    initial: 19
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t4_sitting_room:
    name: T4 Sitting Room
    min: 10
    max: 22
    step: 0.5
    initial: 21
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t4_hot_water:
    name: T4 Hot Water
    min: 10
    max: 55
    step: 0.5
    initial: 45
    mode: box
    icon: mdi:home-thermometer-outline  

  t5_upstairs:
    name: T5 Upstairs
    min: 10
    max: 22
    step: 0.5
    initial: 19
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t5_sitting_room:
    name: T5 Sitting Room
    min: 10
    max: 22
    step: 0.5
    initial: 21
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t5_hot_water:
    name: T5 Hot Water
    min: 10
    max: 55
    step: 0.5
    initial: 45
    mode: box
    icon: mdi:home-thermometer-outline  

  t6_upstairs:
    name: T^ Upstairs
    min: 10
    max: 22
    step: 0.5
    initial: 19
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t6_sitting_room:
    name: T6 Sitting Room
    min: 10
    max: 22
    step: 0.5
    initial: 21
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t6_hot_water:
    name: T6 Hot Water
    min: 10
    max: 55
    step: 0.5
    initial: 45
    mode: box
    icon: mdi:home-thermometer-outline  

  t7_upstairs:
    name: T7 Upstairs
    min: 10
    max: 22
    step: 0.5
    initial: 20
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t7_sitting_room:
    name: T7 Sitting Room
    min: 10
    max: 22
    step: 0.5
    initial: 21
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t7_hot_water:
    name: T7 Hot Water
    min: 10
    max: 55
    step: 0.5
    initial: 45
    mode: box
    icon: mdi:home-thermometer-outline  

  t8_upstairs:
    name: T8 Upstairs
    min: 10
    max: 22
    step: 0.5
    initial: 19
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t8_sitting_room:
    name: T8 Sitting Room
    min: 10
    max: 22
    step: 0.5
    initial: 21
    mode: box
    icon: mdi:home-thermometer-outline  
    
  t8_hot_water:
    name: T8 Hot Water
    min: 10
    max: 55
    step: 0.5
    initial: 45
    mode: box
    icon: mdi:home-thermometer-outline  


#----------------night temp/ min temp----------------------------------------
  t0_temp:  
    name: T night
    min: 10
    max: 20
    step: 0.5
    initial: 16
    mode: box
    icon: mdi:home-thermometer     
    
#-----------------Boiler Program Temperatures---------------------------------
  t1_temp:  # temperature preset T1
    name: °C
    min: 10
    max: 25
    step: 0.5 
    initial: 20
    mode: box
    icon: mdi:home-thermometer-outline
    
  t2_temp:  # temperature preset T2
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 18
    mode: box
    icon: mdi:home-thermometer-outline

  t3_temp:  # temperature preset T3
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 20
    mode: box
    icon: mdi:home-thermometer-outline

  t4_temp:  # temperature preset T4
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 18
    mode: box
    icon: mdi:home-thermometer-outline
    
  t5_temp:  # temperature preset T5
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 20 
    mode: box
    icon: mdi:home-thermometer-outline
    
  t6_temp:  # temperature preset T6
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 18
    mode: box
    icon: mdi:home-thermometer-outline
    
  t7_temp:  # temperature preset T7
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 21
    mode: box
    icon: mdi:home-thermometer-outline
    
  t8_temp:  # temperature preset T8
    name: °C
    min: 10
    max: 25
    step: 0.5
    initial: 18
    mode: box
    icon: mdi:home-thermometer-outline    
    
    
#---------------------immersion heater--------------------------------
  immersion_temp:
    name: Immersion °C
    min: 30
    max: 65
    step: 0.5
    initial: 45
    mode: box
    icon: mdi:hot-tub
    
  immersion_timer:  # set time for immersion heater
    name: Minutes
    initial: 60
    min: 10
    max: 120
    step: 1 
    mode: box
    icon: mdi:timer-sand


#--------------------Boost timer settings-----------------------------------
  boiler_timer:  # set time for boost heating start
    name: Minutes
    initial: 60
    min: 10
    max: 120
    step: 1 
    mode: box
    icon: mdi:timer-sand
    
  temp_boost:  # temperature preset boost
    name: Temp Boost
    min: 10
    max: 25
    step: 0.5
    initial: 20
    mode: box
    icon: mdi:home-thermometer-outline
    
#-----------------boolean switches-------------    
input_boolean:
  heating_master: # if ON enable heating week timer
    name: Heating Auto timer
    icon: mdi:av-timer
    
  switch_boiler_timer: # if ON start heating for xxx minutes (input_number.boiler_timer). Override week timer.
    name: Boost Timer
    initial: off
    icon: mdi:radiator
    
  switch_immersion_timer:
    name: Immersion timer
    initial: off
    icon: mdi:hot-tub
    
#-----------------boolean weekday/weekend switches-------------    

  switch_weekday_p1:
    name: Weekday
    initial: on
    icon: mdi:calendar-today
    
  switch_saturday_p1:
    name: Saturday
    initial: on
    icon: mdi:calendar-today
    
  switch_sunday_p1:
    name: Sunday
    initial: on
    icon: mdi:calendar-today
    
  switch_weekday_p2:
    name: Weekday
    initial: on
    icon: mdi:calendar-today
    
  switch_saturday_p2:
    name: Saturday
    initial: on
    icon: mdi:calendar-today
    
  switch_sunday_p2:
    name: Sunday
    initial: on
    icon: mdi:calendar-today
    
  switch_weekday_p3:
    name: Weekday
    initial: on
    icon: mdi:calendar-today
    
  switch_saturday_p3:
    name: Saturday
    initial: on
    icon: mdi:calendar-today
    
  switch_sunday_p3:
    name: Sunday
    initial: on
    icon: mdi:calendar-today
    
  switch_weekday_p4:
    name: Weekday
    initial: on
    icon: mdi:calendar-today
    
  switch_saturday_p4:
    name: Saturday
    initial: on
    icon: mdi:calendar-today
    
  switch_sunday_p4:
    name: Sunday
    initial: on
    icon: mdi:calendar-today
    
  switch_weekday_p5:
    name: Weekday
    initial: on
    icon: mdi:calendar-today
    
  switch_saturday_p5:
    name: Saturday
    initial: on
    icon: mdi:calendar-today
    
  switch_sunday_p5:
    name: Sunday
    initial: on
    icon: mdi:calendar-today
    
  switch_weekday_p6:
    name: Weekday
    initial: on
    icon: mdi:calendar-today
    
  switch_saturday_p6:
    name: Saturday
    initial: on
    icon: mdi:calendar-today
    
  switch_sunday_p6:
    name: Sunday
    initial: on
    icon: mdi:calendar-today
 
  switch_weekday_p7:
    name: Weekday
    initial: on
    icon: mdi:calendar-today
    
  switch_saturday_p7:
    name: Saturday
    initial: on
    icon: mdi:calendar-today
    
  switch_sunday_p7:
    name: Sunday
    initial: on
    icon: mdi:calendar-today
    
  switch_weekday_p8:
    name: Weekday
    initial: on
    icon: mdi:calendar-today
    
  switch_saturday_p8:
    name: Saturday
    initial: on
    icon: mdi:calendar-today
    
  switch_sunday_p8:
    name: Sunday
    initial: on
    icon: mdi:calendar-today
    
#-----------------------------sensors----------------------------------------------------------------
#weather sensor    
sensor:
  - platform: yr
    name: Weather
    forecast: 0
    monitored_conditions:
      - temperature
#time sensor
  - platform: time_date
    display_options:
      - 'time'
      - 'date'
      - 'date_time'
      - 'date_time_iso'
      - 'time_date'
      - 'time_utc'
      - 'beat'

#program 8 time slots for weekday, saturday and sunday/holiday
  - platform: template
    sensors:
      heating_program:
        friendly_name: "Heating Program"
        value_template: >-  # ok 141119
         {% set t = states('sensor.time') %}
            {% if is_state('binary_sensor.workday_today', 'on') %}
              {% if now().weekday() in (0,1,2,3,4) %}
              {%   if states('input_datetime.p1_on') <= t <= states('input_datetime.p2_on') and is_state('input_boolean.switch_weekday_p1', 'on')  %} p1
              {% elif states('input_datetime.p2_on') <= t <= states('input_datetime.p3_on') and is_state('input_boolean.switch_weekday_p2', 'on')  %} p2
              {% elif states('input_datetime.p3_on') <= t <= states('input_datetime.p4_on') and is_state('input_boolean.switch_weekday_p3', 'on')  %} p3 
              {% elif states('input_datetime.p4_on') <= t <= states('input_datetime.p5_on') and is_state('input_boolean.switch_weekday_p4', 'on')  %} p4
              {% elif states('input_datetime.p5_on') <= t <= states('input_datetime.p6_on') and is_state('input_boolean.switch_weekday_p5', 'on')  %} p5
              {% elif states('input_datetime.p6_on') <= t <= states('input_datetime.p7_on') and is_state('input_boolean.switch_weekday_p6', 'on')  %} p6
              {% elif states('input_datetime.p7_on') <= t <= states('input_datetime.p8_on') and is_state('input_boolean.switch_weekday_p7', 'on')  %} p7
              {% elif states('input_datetime.p8_on') <= t < '23:59' and is_state('input_boolean.switch_weekday_p8', 'on') %} p8
              {% else %} p0
              {% endif %}
            {% else %}
              {%   if states('input_datetime.p1_on') <= t <= states('input_datetime.p2_on') and is_state('input_boolean.switch_saturday_p1', 'on')  %} p1
              {% elif states('input_datetime.p2_on') <= t <= states('input_datetime.p3_on') and is_state('input_boolean.switch_saturday_p2', 'on')  %} p2
              {% elif states('input_datetime.p3_on') <= t <= states('input_datetime.p4_on') and is_state('input_boolean.switch_saturday_p3', 'on')  %} p3 
              {% elif states('input_datetime.p4_on') <= t <= states('input_datetime.p5_on') and is_state('input_boolean.switch_saturday_p4', 'on')  %} p4
              {% elif states('input_datetime.p5_on') <= t <= states('input_datetime.p6_on') and is_state('input_boolean.switch_saturday_p5', 'on')  %} p5
              {% elif states('input_datetime.p6_on') <= t <= states('input_datetime.p7_on') and is_state('input_boolean.switch_saturday_p6', 'on')  %} p6
              {% elif states('input_datetime.p7_on') <= t <= states('input_datetime.p8_on') and is_state('input_boolean.switch_saturday_p7', 'on')  %} p7
              {% elif states('input_datetime.p8_on') <= t < '23:59' and is_state('input_boolean.switch_saturday_p8', 'on') %} p8
              {% else %} p0
              {% endif %}
            {% endif %}
          {% else %}
              {%   if states('input_datetime.p1_on') <= t <= states('input_datetime.p2_on') and is_state('input_boolean.switch_sunday_p1', 'on')  %} p1
              {% elif states('input_datetime.p2_on') <= t <= states('input_datetime.p3_on') and is_state('input_boolean.switch_sunday_p2', 'on')  %} p2
              {% elif states('input_datetime.p3_on') <= t <= states('input_datetime.p4_on') and is_state('input_boolean.switch_sunday_p3', 'on')  %} p3 
              {% elif states('input_datetime.p4_on') <= t <= states('input_datetime.p5_on') and is_state('input_boolean.switch_sunday_p4', 'on')  %} p4
              {% elif states('input_datetime.p5_on') <= t <= states('input_datetime.p6_on') and is_state('input_boolean.switch_sunday_p5', 'on')  %} p5
              {% elif states('input_datetime.p6_on') <= t <= states('input_datetime.p7_on') and is_state('input_boolean.switch_sunday_p6', 'on')  %} p6
              {% elif states('input_datetime.p7_on') <= t <= states('input_datetime.p8_on') and is_state('input_boolean.switch_sunday_p7', 'on')  %} p7
              {% elif states('input_datetime.p8_on') <= t < '23:59' and is_state('input_boolean.switch_sunday_p8', 'on') %} p8
              {% else %} p0
            {% endif %}
          {% endif %}



#define temperature sensors                
  - platform: template  
    sensors:
      current_temp:
        value_template: "{{ states.climate.bfb4fbcb25305e7371a3yn.attributes.current_temperature }}" #read downstairs temp as a sensor
      upstairs_temp:
        value_template: "{{ states.climate.bf0dca95cb90411960fl8n.attributes.current_temperature }}" #read upstairs temp as a sensor
      hvac_temperature_knob:
        value_template: "{{ states.climate.ha_thermo.attributes.temperature }}" #read boler stat temp as a sensor

        
#---------------------------------Time inputs------------------------------------------------------        
input_datetime:
  p1_on:
    name: P1
    has_time: true
    initial: '06:00:00'
    icon: mdi:clock-start   
    
  p2_on:
    name: P2
    has_time: true
    initial: '09:00:00'
    icon: mdi:clock-end     
    
  p3_on:
    name: P3
    has_time: true
    initial: '11:00:00'
    icon: mdi:clock-end       
  
  p4_on:
    name: P4
    has_time: true
    initial: '13:00:00'
    icon: mdi:clock-end
    
  p5_on:
    name: P5
    has_time: true
    initial: '15:00:00'
    icon: mdi:clock-end  
    
  p6_on:
    name: P6
    has_time: true
    initial: '17:00:00'
    icon: mdi:clock-end  
    
  p7_on:
    name: P6
    has_time: true
    initial: '19:00:00'
    icon: mdi:clock-end 
    
  p8_on:
    name: P6
    has_time: true
    initial: '22:00:00'
    icon: mdi:clock-end     


  immersion_auto_on:
    name: Imerrsion Auto On 
    has_time: true
    initial: '19:00:00'
    icon: mdi:clock-end

Lovelace

title: Home
views:
  - badges:
      - entity: sun.sun
        name: Day Light
      - entity: sensor.weather_temperature
        name: Outside °C
      - entity: sensor.time
    cards:
      - cards:
          - entity: climate.ha_thermo
            name: Boiler
            type: thermostat
          - entities:
              - entity: input_boolean.switch_boiler_timer
                name: Boost Central Heating
              - entity: input_number.boiler_timer
                name: Minutes 10 - 120
              - entity: input_number.temp_boost
                name: Boost Temperature °C
            type: entities
        type: vertical-stack
      - cards:
          - entity: sensor.upstairs_temp
            max: 30
            min: 0
            name: Upstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entity: sensor.current_temp
            max: 30
            min: 0
            name: Downstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entities:
              - entity: input_boolean.heating_master
                name: Heating Schedule On/Off
              - entity: input_number.t0_temp
                name: Min Night Temperature °C
            show_header_toggle: false
            type: entities
          - entities:
              - entity: switch.700574032462ab3b7e49
                icon: 'mdi:fire'
              - entity: sensor.current_temp
                icon: 'mdi:home-thermometer-outline'
                name: Downstairs
              - entity: sensor.upstairs_temp
                icon: 'mdi:home-thermometer-outline'
                name: Upstairs
              - entity: switch.bfd019f305520a0591hgke
                icon: 'mdi:hot-tub'
            name: Immersion
            show_name: true
            show_state: true
            type: glance
        type: vertical-stack
    icon: 'mdi:fire'
    path: default_view
    title: Central Heating
  - badges: []
    cards:
      - entity: climate.bf0dca95cb90411960fl8n
        name: Upstairs
        type: thermostat
      - entity: climate.ha_thermo
        name: Downstairs
        type: thermostat
      - cards:
          - entity: sensor.upstairs_temp
            max: 30
            min: 0
            name: Upstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entity: sensor.current_temp
            max: 30
            min: 0
            name: Downstairs Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
            unit: °C
          - entity: sensor.temperature_sensor_20_0
            max: 30
            min: 0
            name: Kitchen Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
          - entity: sensor.temperature_sensor_21_0
            max: 30
            min: 0
            name: Front Room Temp
            severity:
              green: 18
              red: 23
              yellow: 20
            theme: default
            type: gauge
        title: Room Temperature
        type: vertical-stack
    icon: 'mdi:home-thermometer'
    panel: false
    path: zones
    title: Zone Temperatures
  - badges: []
    cards:
      - entity: climate.hw_thermostat
        name: Immersion Heater
        type: thermostat
      - entities:
          - entity: input_boolean.switch_immersion_timer
          - entity: input_number.immersion_timer
            name: Minutes 10 - 120
          - entity: automation.immersion_on_time
            icon: 'mdi:hot-tub'
            name: Immersion Auto On
          - entity: input_datetime.immersion_auto_on
            icon: 'mdi:clock-outline'
            name: Immersion Auto On Time
          - entity: input_number.immersion_temp
            icon: 'mdi:thermometer'
        show_header_toggle: false
        type: entities
      - Name: Water Temp Sensors
        cards:
          - entity: sensor.temperature_sensor_32_0
            max: 100
            min: 0
            name: HW Taps Temp
            severity:
              green: 35
              red: 55
              yellow: 45
            theme: default
            type: gauge
          - entity: sensor.temperature_sensor_31_0
            max: 100
            min: 0
            name: HW Boiler Temp
            severity:
              green: 35
              red: 55
              yellow: 45
            theme: default
            type: gauge
          - entity: sensor.temperature_sensor_30_0
            max: 100
            min: 0
            name: HW Solar Temp
            severity:
              green: 35
              red: 55
              yellow: 45
            theme: default
            type: gauge
        title: Hot Water Temperature
        type: vertical-stack
    path: hw
    title: HW
  - badges: []
    cards:
      - cards:
          - entities:
              - entity: input_boolean.switch_weekday_p1
              - entity: input_boolean.switch_saturday_p1
              - entity: input_boolean.switch_sunday_p1
            show_icon: false
            show_name: true
            show_state: true
            type: glance
          - entities:
              - entity: input_datetime.p1_on
                icon: 'mdi:clock-start'
                name: Begin
              - entity: input_number.t1_upstairs
                name: Upstairs Temp
              - entity: input_number.t1_temp
                name: Downstairs Temp
              - entity: input_number.t1_sitting_room
                name: Sitting Room Temp
              - entity: input_number.t1_hot_water
                icon: 'mdi:thermometer'
                name: Hot Water Temp
              - entity: input_datetime.p2_on
                name: End
            show_header_toggle: false
            type: entities
        title: Heating Schedule 1
        type: vertical-stack
      - cards:
          - entities:
              - entity: input_boolean.switch_weekday_p2
              - entity: input_boolean.switch_saturday_p2
              - entity: input_boolean.switch_sunday_p2
            show_icon: false
            show_name: true
            show_state: true
            type: glance
          - entities:
              - entity: input_datetime.p2_on
                icon: 'mdi:clock-start'
                name: Begin
              - entity: input_number.t2_upstairs
                name: Upstairs Temp
              - entity: input_number.t2_temp
                name: Downstairs Temp
              - entity: input_number.t2_sitting_room
                name: Sitting Room Temp
              - entity: input_number.t2_hot_water
                icon: 'mdi:thermometer'
                name: Hot Water Temp
              - entity: input_datetime.p3_on
                name: End
            show_header_toggle: false
            type: entities
        title: Heating Schedule 2
        type: vertical-stack
      - cards:
          - entities:
              - entity: input_boolean.switch_weekday_p3
              - entity: input_boolean.switch_saturday_p3
              - entity: input_boolean.switch_sunday_p3
            show_icon: false
            show_name: true
            show_state: true
            type: glance
          - entities:
              - entity: input_datetime.p3_on
                icon: 'mdi:clock-start'
                name: Begin
              - entity: input_number.t3_upstairs
                name: Upstairs Temp
              - entity: input_number.t3_temp
                name: Downstairs Temp
              - entity: input_number.t3_sitting_room
                name: Sitting Room Temp
              - entity: input_number.t3_hot_water
                icon: 'mdi:thermometer'
                name: Hot Water Temp
              - entity: input_datetime.p4_on
                name: End
            show_header_toggle: false
            type: entities
        title: Heating Schedule 3
        type: vertical-stack
      - cards:
          - entities:
              - entity: input_boolean.switch_weekday_p4
              - entity: input_boolean.switch_saturday_p4
              - entity: input_boolean.switch_sunday_p4
            show_icon: false
            show_name: true
            show_state: true
            type: glance
          - entities:
              - entity: input_datetime.p4_on
                icon: 'mdi:clock-start'
                name: Begin
              - entity: input_number.t4_upstairs
                name: Upstairs Temp
              - entity: input_number.t4_temp
                name: Downstairs Temp
              - entity: input_number.t4_sitting_room
                name: Sitting Room Temp
              - entity: input_number.t4_hot_water
                icon: 'mdi:thermometer'
                name: Hot Water Temp
              - entity: input_datetime.p5_on
                name: End
            show_header_toggle: false
            type: entities
        title: Heating Schedule 4
        type: vertical-stack
      - cards:
          - entities:
              - entity: input_boolean.switch_weekday_p5
              - entity: input_boolean.switch_saturday_p5
              - entity: input_boolean.switch_sunday_p5
            show_icon: false
            show_name: true
            show_state: true
            type: glance
          - entities:
              - entity: input_datetime.p5_on
                icon: 'mdi:clock-start'
                name: Begin
              - entity: input_number.t5_upstairs
                name: Upstairs Temp
              - entity: input_number.t5_temp
                name: Downstairs Temp
              - entity: input_number.t5_sitting_room
                name: Sitting Room Temp
              - entity: input_number.t5_hot_water
                icon: 'mdi:thermometer'
                name: Hot Water Temp
              - entity: input_datetime.p6_on
                name: End
            show_header_toggle: false
            type: entities
        title: Heating Schedule 5
        type: vertical-stack
      - cards:
          - entities:
              - entity: input_boolean.switch_weekday_p6
              - entity: input_boolean.switch_saturday_p6
              - entity: input_boolean.switch_sunday_p6
            show_icon: false
            show_name: true
            show_state: true
            type: glance
          - entities:
              - entity: input_datetime.p6_on
                icon: 'mdi:clock-start'
                name: Begin
              - entity: input_number.t6_upstairs
                name: Upstairs Temp
              - entity: input_number.t6_temp
                name: Downstairs Temp
              - entity: input_number.t6_sitting_room
                name: Sitting Room Temp
              - entity: input_number.t6_hot_water
                icon: 'mdi:thermometer'
                name: Hot Water Temp
              - entity: input_datetime.p7_on
                name: End
            show_header_toggle: false
            type: entities
        title: Heating Schedule 6
        type: vertical-stack
      - cards:
          - entities:
              - entity: input_boolean.switch_weekday_p7
              - entity: input_boolean.switch_saturday_p7
              - entity: input_boolean.switch_sunday_p7
            show_icon: false
            show_name: true
            show_state: true
            type: glance
          - entities:
              - entity: input_datetime.p7_on
                icon: 'mdi:clock-start'
                name: Begin
              - entity: input_number.t7_upstairs
                name: Upstairs Temp
              - entity: input_number.t7_temp
                name: Downstairs Temp
              - entity: input_number.t7_sitting_room
                name: Sitting Room Temp
              - entity: input_number.t7_hot_water
                icon: 'mdi:thermometer'
                name: Hot Water Temp
              - entity: input_datetime.p8_on
                name: End
            show_header_toggle: false
            type: entities
        title: Heating Schedule 7
        type: vertical-stack
      - cards:
          - entities:
              - entity: input_boolean.switch_weekday_p8
              - entity: input_boolean.switch_saturday_p8
              - entity: input_boolean.switch_sunday_p8
            show_icon: false
            show_name: true
            show_state: true
            type: glance
          - entities:
              - entity: input_datetime.p8_on
                icon: 'mdi:clock-start'
                name: Begin
              - entity: input_number.t8_upstairs
                name: Upstairs Temp
              - entity: input_number.t8_temp
                name: Downstairs Temp
              - entity: input_number.t8_sitting_room
                name: Sitting Room Temp
              - entity: input_number.t8_hot_water
                icon: 'mdi:thermometer'
                name: Hot Water Temp
            show_header_toggle: false
            type: entities
        title: Heating Schedule 8
        type: vertical-stack
    icon: 'mdi:clock'
    path: ''
    title: schedule
  - badges: []
    cards:
      - entities:
          - entity: sensor.temperature_sensor_30_0
            name: Solar Temperature
          - entity: sensor.temperature_sensor_31_0
            name: Boiler Temperature
          - entity: sensor.temperature_sensor_32_0
            name: Taps Temperature
          - entity: switch.bfd019f305520a0591hgke
        hours_to_show: 24
        refresh_interval: 0
        title: Hot Water
        type: history-graph
      - entities:
          - entity: switch.700574032462ab3b7e49
          - entity: climate.bf0dca95cb90411960fl8n
          - entity: climate.bfb4fbcb25305e7371a3yn
        hours_to_show: 24
        refresh_interval: 0
        title: Zone Temperature
        type: history-graph
      - entities:
          - entity: sensor.temperature_sensor_20_0
            name: Kitchen
          - entity: sensor.temperature_sensor_21_0
            name: Front Room
        hours_to_show: 24
        refresh_interval: 0
        title: Room Temperatures
        type: history-graph
      - entities:
          - entity: sensor.weather_temperature
        hours_to_show: 24
        refresh_interval: 0
        title: Outside Temperature
        type: history-graph
    icon: 'mdi:chart-areaspline'
    path: graphs
    title: Graphs

automation.yaml, only includes boiler and zone scheduling as the hotwater zone and sitting room zone controls are still a work in progress.

#-------------------Boost Automation-------------------------
- alias: boiler timed on
  trigger:
  - platform: state
    entity_id: input_boolean.switch_boiler_timer
    to: 'on'
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: '{{ states.input_number.temp_boost.state }}'
  id: 26cdd0087f934e38b4cdf050e6df5031
- alias: boiler timed off
  trigger:
  - platform: state
    entity_id: input_boolean.switch_boiler_timer
    to: 'off'
  - platform: state
    entity_id: input_boolean.switch_boiler_timer
    to: 'on'
    for:
      minutes: '{{ states.input_number.boiler_timer.state | int }}'
  action:
  - service: input_boolean.turn_off
    entity_id: input_boolean.switch_boiler_timer
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: '{{ states.input_number.t0_temp.state }}'
  id: e08c0d734ef24fcc97e04643a71b60b1
#---------------------------Week timer Automation----------------------
- alias: weektimer_program
  trigger:
  - platform: state
    entity_id: sensor.heating_program
  condition:
  - condition: state
    entity_id: input_boolean.heating_master
    state: 'on'
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: >-
           {% if is_state('sensor.heating_program', 'p1') %} {{ states.input_number.t1_temp.state }}
           {% elif is_state('sensor.heating_program', 'p2') %} {{ states.input_number.t2_temp.state }}
           {% elif is_state('sensor.heating_program', 'p3') %} {{ states.input_number.t3_temp.state }}
           {% elif is_state('sensor.heating_program', 'p4') %} {{ states.input_number.t4_temp.state }}
           {% elif is_state('sensor.heating_program', 'p5') %} {{ states.input_number.t5_temp.state }}
           {% elif is_state('sensor.heating_program', 'p6') %} {{ states.input_number.t6_temp.state }}
           {% elif is_state('sensor.heating_program', 'p7') %} {{ states.input_number.t7_temp.state }}
           {% elif is_state('sensor.heating_program', 'p8') %} {{ states.input_number.t8_temp.state }}
           {% elif is_state('sensor.heating_program', 'p0') %} {{ states.input_number.t0_temp.state }}
           {% endif %}  
  id: 47141d0a7f8d420885cd15bc3cbb5888
- alias: temp_lock
  trigger:
  - platform: state
    entity_id: sensor.hvac_temperature_knob
  - platform: state
    entity_id: input_boolean.heating_master
    to: 'on'
  condition:
  - condition: state
    entity_id: input_boolean.switch_boiler_timer
    state: 'off'
  - condition: state
    entity_id: input_boolean.heating_master
    state: 'on'
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.ha_thermo
      temperature: >-
           {% if is_state('sensor.heating_program', 'p1') %} {{ states.input_number.t1_temp.state }}
           {% elif is_state('sensor.heating_program', 'p2') %} {{ states.input_number.t2_temp.state }}
           {% elif is_state('sensor.heating_program', 'p3') %} {{ states.input_number.t3_temp.state }}
           {% elif is_state('sensor.heating_program', 'p4') %} {{ states.input_number.t4_temp.state }}
           {% elif is_state('sensor.heating_program', 'p5') %} {{ states.input_number.t5_temp.state }}
           {% elif is_state('sensor.heating_program', 'p6') %} {{ states.input_number.t6_temp.state }}
           {% elif is_state('sensor.heating_program', 'p7') %} {{ states.input_number.t7_temp.state }}
           {% elif is_state('sensor.heating_program', 'p8') %} {{ states.input_number.t8_temp.state }}
           {% elif is_state('sensor.heating_program', 'p0') %} {{ states.input_number.t0_temp.state }}
           {% endif %}  
  id: 47141d0a7f8d420885cd15bc3cbb5889
#-------------------------------zone valve protection---------------------------------------
#------------Zone valves Deenergize when heat is off to prolong life of valves---------------
- id: '1577612881345'
  alias: valves on
  description: ''
  trigger:
  - entity_id: switch.700574032462ab3b7e49
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bf0dca95cb90411960fl8n
      temperature: >-
           {% if is_state('sensor.heating_program', 'p1') %} {{ states.input_number.t1_upstairs.state }}
           {% elif is_state('sensor.heating_program', 'p2') %} {{ states.input_number.t2_upstairs.state }}
           {% elif is_state('sensor.heating_program', 'p3') %} {{ states.input_number.t3_upstairs.state }}
           {% elif is_state('sensor.heating_program', 'p4') %} {{ states.input_number.t4_upstairs.state }}
           {% elif is_state('sensor.heating_program', 'p5') %} {{ states.input_number.t5_upstairs.state }}
           {% elif is_state('sensor.heating_program', 'p6') %} {{ states.input_number.t6_upstairs.state }}
           {% elif is_state('sensor.heating_program', 'p7') %} {{ states.input_number.t7_upstairs.state }}
           {% elif is_state('sensor.heating_program', 'p8') %} {{ states.input_number.t8_upstairs.state }}
           {% elif is_state('sensor.heating_program', 'p0') %} {{ states.input_number.t0_upstairs.state }}
           {% endif %}  
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bfb4fbcb25305e7371a3yn
      temperature: '23'
- id: '1577612972092'
  alias: valves off
  description: ''
  trigger:
  - entity_id: switch.700574032462ab3b7e49
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bf0dca95cb90411960fl8n
      temperature: '{{ states.input_number.t0_temp.state }}'
  - service: climate.set_temperature
    data_template:
      entity_id: climate.bfb4fbcb25305e7371a3yn
      temperature: '{{ states.input_number.t0_temp.state }}'
#---------------------Immersion Timer Automation------------------------------------
- id: '1578520268091'
  alias: Immersion Timer
  description: ''
  trigger:
  - entity_id: input_boolean.switch_immersion_timer
    platform: state
    to: 'on'
  condition: []
  action:
    - service: climate.set_hvac_mode
      entity_id: climate.hw_thermostat
      data_template:
        hvac_mode: "heat"
    - service: climate.set_temperature
      data_template:
        entity_id: climate.hw_thermostat
        temperature: '{{ states.input_number.immersion_temp.state }}'

- id: '1578521662871'
  alias: Immersion timed off
  trigger:
  - platform: state
    entity_id: input_boolean.switch_immersion_timer
    to: 'off'
  - platform: state
    entity_id: input_boolean.switch_immersion_timer
    to: 'on'
    for:
      minutes: '{{ states.input_number.immersion_timer.state | int }}'
  action:
  - service: input_boolean.turn_off
    entity_id: input_boolean.switch_immersion_timer
  - service: climate.set_hvac_mode
    entity_id: climate.hw_thermostat
    data:
      hvac_mode: "off"
- id: '1578653513704'
  alias: Immersion On Time
  description: ''
  trigger:
  - platform: template
    value_template: "{{ states.sensor.time.state == states.input_datetime.immersion_auto_on.state[0:5] }}"
  condition: []
  action:
  - entity_id: input_boolean.switch_immersion_timer
    service: input_boolean.turn_on

This is excellent work. I’m interested in where you’ve taken it since the last update.
I’m taking this code, thank you so much.

One question: lets say at someone adjusts the temperature of a zone by turning up the rad valve. Is there any way to capture that and update that particular time/zone so it remembers it next time?
I think what i’m asking for is probably way to complicated and opens up more problems than it solves. But curious what you think?

Thansk,
Michael

Well thank you very much. I’ll have to get to you on where I’ve taken this as it is a good while since I’ve looked on here, but I will reply again shortly.

I’ve not any kind of learning built into this, I think that would be well beyond my current capabilities.
Personally I’ve wanted to keep this as simple as possible for those using it (AKA the family), so far its worked out well and it is rare that anyone touches the heating controls. If someone adjusts a wall stat then the room temperature just stays at the new temperature until the next scheduled change.

Edit:
Here is a link to my most up to date heating controls on here (from March 2020) There probably are a few changes since then too.

@ dawsonweb I’ve just updated with current config in the other thread, feel free to have a look.

Blockquote

2 Likes