Hi Community,
I want to calculate how much energy from my PV I give away for free. I have the problem that my electric meter doesn’t supply the 2.8.0 value. My meter gives me the current consumption in W (which is negative when I feed-in to the grid).
So I can see when I give power away, however only in W as single point in time and not as W/h. What I already do is to read the value all 10 seconds. What I’m now searching for is a function in Home Assistant that sums only the negative values from a given timeframe and divides them by a variable.
Example: if I add all negative values collected during the last hour, and divide them by their number it should give me a rough estimate how much W/h I “lost” during the last hour. (I know that this can only be an estimate, but it’s much much much better than no value at all…)
Bonus points if anyone has a solution that integrates the result in the energy dashboard. Because currently I have the problem that the only W/h values I have are the power generated by my PV and the power I got from the grid. So home assistant calculates that my power consumption is everything that I generated plus everything from the grid, because I have no W/h value from what i fed-in.