Can You Boost Heat Pump Efficiency with Home Assistant!

YouTube player

Our heat pump wasn’t working very efficiently in our old house. I dive into how I’ve integrated the pump with Home Assistant and used that to automatically manage the flow temperature and on / off state of the pump.

Heating Off YAML

alias: Heating Off
description: ""
trigger:
  - platform: state
    entity_id:
      - schedule.heating_on
    from: "on"
    to: "off"
condition: []
action:
  - type: turn_off
    device_id: 6900d7f8bc708e4f715890599b41fbf7
    entity_id: switch.thermostat_receiver
    domain: switch
mode: single


Heating On When Required YAML

alias: Heating On When Required
description: >-
  If the heating is scheduled to be on and is required, switch on pump otherwise
  switch off
trigger:
  - platform: time_pattern
    minutes: /5
condition:
  - condition: state
    entity_id: schedule.heating_on
    state: "on"
action:
  - if:
      - condition: numeric_state
        entity_id: sensor.bedroom_average_temp
        below: input_number.heating_target_temp
    then:
      - condition: device
        type: is_off
        device_id: 6900d7f8bc708e4f715890599b41fbf7
        entity_id: switch.thermostat_receiver
        domain: switch
      - type: turn_on
        device_id: 6900d7f8bc708e4f715890599b41fbf7
        entity_id: switch.thermostat_receiver
        domain: switch
      - delay:
          hours: 0
          minutes: 0
          seconds: 45
          milliseconds: 0
      - service: climate.set_temperature
        data:
          temperature: >-
            {{ max(states('input_number.heating_target_temp')|float+1,
            min(states('input_number.heating_max_water_temp')|float, 20 +
            ((states('input_number.heating_max_water_temp')|float - 20) *
            (states('input_number.heating_target_temp')|float -
            states('sensor.bedroom_average_temp')|float))))|round }} 
        target:
          entity_id: climate.air_to_water_heat_pump
      - delay:
          hours: 0
          minutes: 30
          seconds: 0
          milliseconds: 0
    else:
      - if:
          - condition: or
            conditions:
              - condition: numeric_state
                entity_id: sensor.heat_pump_flow_temp
                below: input_number.heating_target_temp
                value_template: "{{ float(state.state) - 2 }}"
              - condition: numeric_state
                entity_id: sensor.heat_pump_flow_temp
                below: "21"
        then:
          - condition: device
            type: is_on
            device_id: 6900d7f8bc708e4f715890599b41fbf7
            entity_id: switch.thermostat_receiver
            domain: switch
          - type: turn_off
            device_id: 6900d7f8bc708e4f715890599b41fbf7
            entity_id: switch.thermostat_receiver
            domain: switch
          - delay:
              hours: 0
              minutes: 30
              seconds: 0
              milliseconds: 0
mode: single


Heating Flow Temp Manager YAML

alias: Heating Flow Temp Manager
description: ""
trigger:
  - platform: time_pattern
    minutes: /15
  - platform: device
    type: turned_on
    device_id: 6900d7f8bc708e4f715890599b41fbf7
    entity_id: switch.thermostat_receiver
    domain: switch
    for:
      hours: 0
      minutes: 1
      seconds: 0
condition:
  - condition: state
    entity_id: switch.thermostat_receiver
    state: "on"
action:
  - if:
      - condition: numeric_state
        entity_id: sensor.bedroom_average_temp
        above: input_number.heating_target_temp
    then:
      - service: climate.set_temperature
        data:
          temperature: >-
            {{ state_attr('climate.air_to_water_heat_pump', 'temperature') - 2
            }}
        target:
          entity_id: climate.air_to_water_heat_pump
    else:
      - if:
          - condition: numeric_state
            entity_id: sensor.bedroom_average_temp
            below: sensor.heat_pump_last_check_plus
          - condition: numeric_state
            entity_id: sensor.heat_pump_flow_temp
            below: input_number.heating_max_water_temp
        then:
          - service: climate.set_temperature
            data:
              temperature: >-
                {{ states('input_number.heating_max_water_temp') if
                (states('input_number.heating_target_temp')|float -
                states('sensor.bedroom_average_temp')|float) > 2 else
                state_attr('climate.air_to_water_heat_pump', 'temperature') + 2
                }}
            target:
              entity_id: climate.air_to_water_heat_pump
  - service: input_number.set_value
    data:
      value: "{{ states('sensor.bedroom_average_temp') | float }}"
    target:
      entity_id: input_number.heating_last_check_temp
mode: single