I have below template sensor setup to calculate heat pump COP and it seems to work descent while unit is running but when it shuts off after run the COP amount returned is inaccurate due to btu out put no longer being valid.
Since the HVAC delta t takes a while to go back down to 0 after unit shuts off, this results in incorrect BTU and COP output. Any idea how to best set BTU output to 0 soon as heat pump is not running perhaps by using heat pump power draw data?
Indeed that is what I would like to do, have BTU be calculated only when ecobee is calling heat/cool and that should take care of COP as well. Right now for both I am just using the helper template sensor with the code posted.
Thanks for the code, I got it semi working using below code:
- sensor:
- name: Heat Pump Coefficient Of Performance
state: >
{% set attributes = state_attr('climate.my_ecobee_4', 'equipment_running') %}
{% if not 'heatPump' in attributes%}
0
{% else %}
{{ ( states('sensor.hvac_btu_output')|float / (states('sensor.heat_pump_power_usage')|float * 3413) )|round(2) }}
{% endif %}
The only issue is ecobee API is slow to update the status (5 minute delay) and in that time the reading is incorrect instead of reading 0.
What would I need to modify in the code to instead of using climate status to use power draw from sensor.heat_pump_energy_consumption to determine if COP should show as 0 (lets say if power draw is less than 0.02)? Or alternatively filter the output so it ignores any COP reading higher than 5?