There are separate APIs for power and energy. The CSV exports are pretty much a raw dump of what the APIs return. I'm not doing any extrapolation in the app, and I presume (but can't confirm) that the energy values measure cumulative totals rather than extrapolate from the instantaneous power readings.Since you are reading off of Tesla's data, are you only using their 5-minute number? Does Tesla integrate accurately what happens between the 5 minute data?
Are you able to integrate the raw reading gathered x number of times in that 5 minute interval?