Riemann Integral creates wrong results

Hi
in my card energy-flow-card-plus I want to integrate 2 solar entity. This ist not possible. So I create a template-sensor as sum of the 2 kwh-sensors from the 2 devices. But the card did not show the correct value of this template. This should be a bug (see the issues of the card.).
So I created first a sum-helper from the power-sensors of the 2 devices. Than I created the integral helper of this sum and last s energy-helper for days.

Bui there is a difference to my first template-sensor. For Testing I created the same for Riemann left, trapez and right.

By this dard day this my results.

grafik

All integral sensors are defined like this:

The basic power-sensor for all is

So my question is, is it normal to get this difference by this low power or what is the reason?

Riemann sum is a simple equation. Is your calculation in the template entity using the same equation? If the answer is no, then there’s the reason for your differences.

See Left Rule (Left), Right Rule (Right), and Midpoint Rule (Trapazoidal) on that wikipedia page.

I ask in this discussion about sungrow inverter which sensor is correct and about the difference
Sungrow.
So I think, I can close here.
Thank you.