Hi all,
I’m struggling with the COP calculation of my heatpump. In sensors.yaml i’ve created this code:
#Realtime COP berekening
- platform: template
sensors:
realtime_cop:
friendly_name: 'Realtime COP'
value_template: >
{% set deltat = states('sensor.deltat') | float %}
{% set pump_raw = states('sensor.shelly_pro3em_total_active_power') | float %}
{% if pump_raw > 0}
{{ ((deltat * 4.2) * (24 / 60) / pump_raw) | round(1, default=0) }}
{% else %} -1
{% endif %}
But I get a syntax error. What I would like to do is to create the COP based on the data of deltat sensor and my current power consumption.
The formula is:
(DeltaT * 4.2) * (24 / 60) / actual power consumption
Any ideas?