Hi,
i am using the ESPAltherma with the default template on a Daikin Altherma 3 H HT.
Data collected with HomeAssistant and made many template sensors.
Everything is working andseems to be fine so far.
Now i want to calculate the energy consumption and COP.
my sensor for energy consumption has just a snippet from the COP calcucation to save the calculated value:
state: "{% if is_state_attr('sensor.althermasensors','I/U betriebsart', 'Heating') and is_state_attr('sensor.althermasensors','Frostschutz Fluss Schalter', 'OFF') %} {{(state_attr('sensor.althermasensors','Durchflussmenge (l/min)')| float * 0.06 * 1.16 * (state_attr('sensor.althermasensors','R1T-Wasser Vorlauftemp. nach dem Plattenwärmetauscher') | float - state_attr('sensor.althermasensors','R4T-Wasser Rücklauftemp. vor dem Plattenwärmetauscher')|float) * 1000)}} {% else %} 0 {%endif%}"
COP is calcuated likle this:
state: "{% if is_state_attr('sensor.althermasensors','I/U betriebsart', 'Heating') and is_state_attr('sensor.althermasensors','Frostschutz Fluss Schalter', 'OFF') %} {{ ((state_attr('sensor.althermasensors','Durchflussmenge (l/min)')| float * 0.06 * 1.16 * (state_attr('sensor.althermasensors','R1T-Wasser Vorlauftemp. nach dem Plattenwärmetauscher') | float - state_attr('sensor.althermasensors','R4T-Wasser Rücklauftemp. vor dem Plattenwärmetauscher')|float) ) / (state_attr('sensor.althermasensors','INV Primärstrom (A)') | float * state_attr('sensor.althermasensors','Spannung (N-Phase) (V)')|float / 1000)) |round(2) }} {% else %} 0 {%endif%}"
I often get some spikes around 6 times a day where the COP is calculates as 40! or around this value. Same with the calculated energy consumption. as i can observe, this is when the I/U mode is "Heating + DHW"
But as shown above, the if condition should only calc when in "Heating" mode.
Does someone has some hints for me, how i can optimize my calculation?
Hi, i am using the ESPAltherma with the default template on a Daikin Altherma 3 H HT. Data collected with HomeAssistant and made many template sensors. Everything is working andseems to be fine so far.
Now i want to calculate the energy consumption and COP.
my sensor for energy consumption has just a snippet from the COP calcucation to save the calculated value:
state: "{% if is_state_attr('sensor.althermasensors','I/U betriebsart', 'Heating') and is_state_attr('sensor.althermasensors','Frostschutz Fluss Schalter', 'OFF') %} {{(state_attr('sensor.althermasensors','Durchflussmenge (l/min)')| float * 0.06 * 1.16 * (state_attr('sensor.althermasensors','R1T-Wasser Vorlauftemp. nach dem Plattenwärmetauscher') | float - state_attr('sensor.althermasensors','R4T-Wasser Rücklauftemp. vor dem Plattenwärmetauscher')|float) * 1000)}} {% else %} 0 {%endif%}"
COP is calcuated likle this:
state: "{% if is_state_attr('sensor.althermasensors','I/U betriebsart', 'Heating') and is_state_attr('sensor.althermasensors','Frostschutz Fluss Schalter', 'OFF') %} {{ ((state_attr('sensor.althermasensors','Durchflussmenge (l/min)')| float * 0.06 * 1.16 * (state_attr('sensor.althermasensors','R1T-Wasser Vorlauftemp. nach dem Plattenwärmetauscher') | float - state_attr('sensor.althermasensors','R4T-Wasser Rücklauftemp. vor dem Plattenwärmetauscher')|float) ) / (state_attr('sensor.althermasensors','INV Primärstrom (A)') | float * state_attr('sensor.althermasensors','Spannung (N-Phase) (V)')|float / 1000)) |round(2) }} {% else %} 0 {%endif%}"
I often get some spikes around 6 times a day where the COP is calculates as 40! or around this value. Same with the calculated energy consumption. as i can observe, this is when the I/U mode is "Heating + DHW" But as shown above, the if condition should only calc when in "Heating" mode.
Does someone has some hints for me, how i can optimize my calculation?
Best regards, Dave