I hope somebody can give me some hints to get my challenge done…
I got a new heat pump and I’m able to collect consumed energy and produced energy. That’s working pretty well! I also configured an utility meter which resets kWh every hour two 0. My target is now, that I take the last values before resetting to 0 to calculate the COP for every hour. I did a lot of tries (also that version you can find in the community) with various configures sensors which use average calculations and so on but unfortunately the results are not satisfying.
Is there any possibility that you do not have a continuous measurement of COP but only one time every hour? After calculating I would like to show the results for every hour in a bar chart.
Thanks for any advise and regards
Fabian
@tom_l It works! Thank you so much. That’s exactly what I’m looking for!
Maybe one question as I’m new to HA: I will create a new sensor which calculates COP at the end of the day. I would like to store these values infinite like the energy dashboard so that I can compare different day over many years. How can I achieve this?
This will store hourly values as LTS (long term statistics) indefinitely (24 values a day).
You can graph this easily enough (use a statistics graph card) but currently there is no easy way to use these values without creating SQL sensors to retrieve the wanted value from the database.
The other option is to set up influxDB for long term data storage and graph it with Grafana.
Hello,
I am also trying to calculate COP but the Code here is providing me some errors. As I am a total newbie I am not sure about the correct wording.
I adjusted your coding with my sensor, that are providing W and both are based on mqtt.