The Nefit / Bosch heat pump like EnviLine, Compress 3400i etc are using an On / Off hysteresis to determine when the compressor should be turned on or off for heating. On the split unit the hysteresis setting can be set manually, the default is 150 Kmin. On the monoblock this can’t be set but seems to be 200 Kmin for the on and 250 Kmin for the off hysteresis.
If you have an EMS bus Gateway, e.g. the one of BBQKees or HusData then your can read the sensors from the heat pump into Home Assistant. Unfortunatly the hysteresis itself you can’t read.
With the following scrips you can create a sensor which visualize the actual hysteresis value. This can help you to predict when the heat pump will switch on or off.
Depending on the configuration in BBQKees you might have the old or new sensor names in Home Assistant. The script below is with the old sensor names. Please check which of the sensor names your installation has and adjust the script accordingly. I might be needed that you have to restart Home Assistant, reloading the YAML is not always working.
Current Flow Temperature
sensor.boiler_current_flow_temperature
sensor.boiler_curflowtemp
Target Flow Temperature
sensor.thermostat_hc1_target_flow_temperature
sensor.thermostat_hc1_targetflowtemp
Compressor Activity
sensor.boiler_compressor_activity
sensor.boiler_hpactivity
configuration.yaml
template:
- sensor:
- name: "Delta_CurrentFlow_TargetFlow"
unit_of_measurement: "K"
state: >
{% set current = states('sensor.boiler_current_flow_temperature') | float %}
{% set target = states('sensor.thermostat_hc1_target_flow_temperature') | float %}
{% if is_state('sensor.boiler_compressor_activity', 'heating') and current > target %}
{{ (current - target) | round(3, default=0) }}
{% elif is_state('sensor.boiler_compressor_activity', 'none') and current < target %}
{{ (target - current) | round(3, default=0) }}
{% else %}
0
{% endif %}
- binary_sensor:
- name: "Current below target"
state: >
{% set current = states('sensor.boiler_current_flow_temperature') | float %}
{% set target = states('sensor.thermostat_hc1_target_flow_temperature') | float %}
{{ (current < target) }}
sensor:
- platform: integration
method: left
source: sensor.delta_currentflow_targetflow
name: "Integration Delta CurrentFlow TargetFlow"
unit_time: min
utility_meter:
hysteresis_currentflow_targetflow:
source: sensor.integration_delta_currentflow_targetflow
cycle: yearly
automations.yaml
- alias: Reset Hysterese
description: With every compressor state change the hysterese will be reset to 0
in order to start a new hysterese
trigger:
- platform: state
entity_id:
- sensor.boiler_compressor_activity
condition: []
action:
- service: utility_meter.calibrate
data:
value: '0'
target:
entity_id: sensor.hysteresis_currentflow_targetflow
mode: single
- alias: Reset hysteresis due to actual below target
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.current_below_target
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: sensor.boiler_compressor_activity
state: heating
action:
- service: utility_meter.calibrate
data:
value: '0'
target:
entity_id: sensor.hysteresis_currentflow_targetflow
mode: single
The result is something like the following: