I’ve got an Ariston Heatpump integrated via eBusd into HA.
I’m gathering all the metrics needed to calculate the COP of the HP, this in all the running configurations.
I already have a formula that calculate the instantaneous COP, based on LWT, EWT and flowmeter readings.
{% if ((states('sensor.ebusd_heatpump_ebusd_heatpump_compressor_info_flow_meter') | float (default=0)) > 15
and (states('sensor.ebusd_heatpump_ebusd_heatpump_heatpump_info_heatpump_mode') | string ) != 'Stand_by') %}
{{ ([0,(((((states('sensor.ebusd_heatpump_ebusd_heatpump_coolat_data_lwt_temp') | float (default=0)) - 0.2 - (states('sensor.ebusd_heatpump_ebusd_heatpump_coolat_data_ewt_temp') | float (default=0)) | abs) * (states('sensor.ebusd_heatpump_ebusd_heatpump_compressor_info_flow_meter') | float (default=1)) * 60 * 1.16) / (states('sensor.ebusd_heatpump_ebusd_heatpump_heatpump_power_consumption') | float (default=1))) |abs |round(2)),8]|sort)[1] }}
I’ll beautify my horrendous code following a hint found here on the forum during my search
{% set vl = states('sensor.LWT') | float %}
{% set rl = states('sensor.EWT') | float %}
{% set vol = states('sensor.Flowmeter') | float * 60 %}
{% set powercons = states('sensor.powercons') | float %}
{% if powercons != 0 %}
{{ ((vl - rl) | abs) * vol * 1.16) / powercons }}
{% else %}
????
{% endif %}
I need help to figure out how to add a little more complexity to the template:
- the returned value should be unavailable if the flowmeter is zero: I want to calculate average COP over longer time periods and when the HP is not running then these value should not alter average calculations
- when the heatpump is doing defrost operations
states('sensor.ebusd_heatpump_ebusd_heatpump_heatpump_info_heatpump_mode') | string ) = 'Defrost'
- then the calculated COP should be negative, as the enegy used is not going into the house but wasted in deicing the battery
- the COP value should be limited into a range let’s say 0-8 because in some corner cases I’ve experimented in the last months the readings may lead to exaggerated values
Can you give me an hint on the syntax to obtain a credible COP calcs?
TY
1 post - 1 participant