Hello everyone,
I have a problem with the Riemann Sum Sensor.
I recently installed a small PV inverter. From this inverter i get power values for each panel, but no sum.
So i created a template sensor to sum up the values. This happens every 15s, whenever the inverter provides new values, but only during the day. At night, the inverter is silent.
Also, when the PV produces more energy than is consumed inside the house, the power value reading from my electric meter turns negative. The metervalues are provided every 10s, day and night.
To get the power that i produced and used myself, i created a template sensor that gives me the complete produced power if the metervalue is positive and gives me the produced power + the metervalue if the metervalue is negative.
from this self-consumed power, i’d like to have an energy reading, mainly for putting this into the energy dashboard, so i created a riemann-sum sensor.
This sensor is working on the day it was created, but during night time, it somehow gets a hiccup and does not provide new values the next day. It only shows “NaN kWh”.
I tested all 3 variants of the riemann sum (left, right, trapezoidal), but none of them work.
I also tried to update the tempate sensor with the self-consumed power, so that it is only updated, when new PV power values are produced. This did not help as well.
Interestingly another template sensor that i generated for the grid supply (which is the absolute value of the metervalue, if it is negative and 0 otherwise) works like a charm.
From my understanding of the sourcecode of the riemann sum sensor, lots of zero-values should not affect the reading, but i am not sure about that.
I am out of ideas and hope, someone can help me.
br