If this value matches what the car displays on the screen, then it will be wrong, as was pointed out.
It is pretty well understood and documented that the “energy added” value on the screen is incorrect, and can be made correct for most Model 3 (no idea how it works in the presence of a varying buffer size for the LFP) by multiplying that value by 0.955.
So it would seem preferable to do that, otherwise it is just very confusing.
I guess the API does not provide this “correct” value, so the difficulty is understood - and users will wonder why the value does not match the screen if this change were made, of course.
But: With the current reporting, users will continually wonder why they get 5% less energy out (energy including heat losses) than the car measures was put in (net). So confusion there too.
Still, seems better to just report the correct value which the BMS has (which fortunately is available after the translation).
I guess it depends on objectives but reporting the correct value and then providing a little “I” information note explaining the discrepancy seems best.
To be clear the energy added is not strictly the energy added even after this correction. It is the net energy difference in the battery that the BMS detects since the car was plugged in. If you use 20kWh with the heat while plugged in, none of that will be counted, of course. It’s not metering the input energy.
It is just miles added reported by the BMS (the delta) times the constant as @AAKEE indicates. The number can decrease while plugged in if the BMS decides to do so. Though I think it probably cannot go negative (a special case which is possible but unlikely).
I guess in a sense it is arbitrary here. As currently reported, users will see they have 4.5% better charging efficiency than they actually have, with 4.5% worse driving efficiency than “expected” (when they total up all their drives over time they’ll see the energy is low by 5%, neglecting standby losses - so this mismatch will likely be interpreted as phantom drain even though it is not).
Is this why my lifetime trip meter in the car shows 215 Wh/mi and Tessie shows 229 Wh/mi? I have a 2023 RWD with LFP battery, so dynamic buffer I guess. At first I assumed the difference was because I didn’t install Tessie until 45 miles on the odometer, but after 1000 miles, I realized they don’t seem to be getting any closer. Then I started to suspect the car was only counting Wh used for moving the car and not for climate and accessory usage, but Tessie was including all energy consumed during drives. Now I just have no clue which is right.