API bug for certain output calculations

FYI, this as well as my thread earlier this week both relate to the Home Assistant Energy Dashboard and the integration with IoTaWatt (see Add energy sensors by agners · Pull Request #6 · gtdiehl/iotawatt_ha · GitHub). I don’t have solar unfortunately, so this problem did not affect me.

That said, something is unclear to me right now. In your detailed explanation you wrote:

With the above metrics, power (Watts) and energy (Wh) for a time period up to a day can be graphed using Graph+ by simply graphing the appropriate inputs and outputs corresponding to the above metrics.

How is that enforced exactly? E.g. what happens when I query Wh over a period of a year with an output making the Import/Export calculations? Is just the integration accuracy dropping or is the query getting slow?

Since Home Assistant stores the data in its own database, I think having accurate Import/Export data for a single day is absolutely enough since we poll the API anyways more often than that.

From what I understand switching to querying the API with begin=d (or even hourly) should be enough?