Create (S)COP sensors

Hi!
I want to create multiple (S)COP sensors. I think I have most of the needed sensors, but I just don’t know how I can make the right templates.

I have these sensors:

  1. sensor.luxtronik_330123_0145_status => gives a status (idle, heating, DHW, cooling)
  2. sensor.luxtronik_330123_0145_heat_amount_heating => in kWh, the total amount my heatpump generates in heat (for status heating)
  3. sensor.luxtronik_330123_0145_dhw_heat_amount => in kWH, the total amount my heat pump generates in heat (for status DHW (Domestic Hot Water)).
  4. sensor.shellypro3emwarmtepomp_total_active_energy => in kWh, the total amount of energy my heat pump has used
  5. sensor.shellyplugswarmtepomp_energy => in kWh, the total amount of energy my controller of the heat pump has used
    (So 4+5 is the total amount my heat pump installation uses to power)

Sensor 2 and 3 are also available in a “current” heating, in W:
6. sensor.luxtronik_330123_0145_current_heat_output => based on the status, it gets added to sensor 2 or 3

Both sensor 4 and 5 are also available in a “current” heating, in W:
4a. sensor.warmtepomp_totaal_active_power
5a. sensor.shellyplugswarmtepomp_power

I think I need these “help” sensors:
7. Power used while Heating (when 1 is “Heating”, this sensor should have the total for sensor 4+5)
8. Power used while Cooling (when 1 is “Cooling”, this sensor should have the total for sensor 4+5)
9. Power used while DHW (when 1 is “DHW”, this sensor should have the total for sensor 4+5)
10. Power used while Idle (when 1 is “Idle”, this sensor should have the total for sensor 4+5)

So, I’d like these sensors:
11. Current COP for Heating: sensor 2 / sensor 7
12. Current COP for DHW: sensor 3 / sensor 9
13. SCOP for Heating: sensor 2 / sensor 7 for a whole year?
14. SCOP for DHW: sensor 2 / sensor 7 for a whole year?
15. SCOP for GeneratingHeat: sensor (2+3) / sensor (7+9) for a whole year?
16. SCOP for Total: sensor (2+3) / sensor (7+8+9+10) for a whole year?

And maybe there are other sensors which are useful around this as well? Who can help me? I have no idea where to start… also, in the sensors 11-16, perhaps I should use a help-sensor where I use sensor 6 based on status (sensor 1)? I don’t know.

Who can help me?

I am curious, did you solve this puzzle? I would like to achieve more or less the same. i roughly have the same sensors available, but puzzling how I can combine two (integral) kWh sensors with a different startdate (offset) into an SCOP sensor calculated over a particular moving period (and of course with the same start date for both input sensors)?

Definitely got it! :slight_smile:
The trick is to use utility meter. Those auto reset daily, monthly, whatever… and then do that for energy used and energy “created”. You can create an automation to switch the current “tariff” of the utility meter to the heat pump status. (So I have tariffs for heating, domestic hot water, cooling and idle).

Hope this helps.

(The yearly cop DHW is an error ofcourse… it’s fixed, but the data won’t restart until January first and haven’t been bothered with it really).