Energy Dashboard statistics : battery discharge calculation error

Since over a year i am running HA, currently:

Home Assistant OS
Core 2025.11.2
Supervisor 2025.11.2
Operating System 16.3
Frontend 20251105.0

I faced a problem in the energie dashboard:

the batterie discharged statistics are calculated somehow wrong.

reason seems to be in one specific day → 14.10.2025 :

currently it shows:
charged +8,88 kWh
discharged -1874 kWh

expectation would be something like:
charged +8,88 kWh
discharged +8,4 kWh

the specific sensor values in the DB looks okay and reasonable to me. also the dashboard overview for that day looks okay and not anyhow negative. only the discharged battery sum in the overview at the right side looks wrong. see red marking

because the sensor values looks okay in DB, i assume that this value is calculated somehow or based on some elsewhere stored data .

my question would be how does the red marked value gets calculated ?

I would like to correct it but dont know where to look.

as comparsion some normal days: 13.10.2025
charged 4,29 kWh
discharged 4,42 kWh

and 15.10.2025
charged 6,32 kWh
discharged 6,78 kWh

Sensor Values rough overview:

Your first link looks broken, but generally you would fix this through the adjust sum dialog from developer-tools/statistics. Have you checked there?

picture worked for me but I changed the link to be same as the 2nd one. thank you.

i did try the dev tools, but the sensor does not have any strange data.
i checked about that also directly in the DB

i tryed already to delete all the sensor values from that day for the discharge sensor.
but it didnt had an affect on this big minus sum of that day.

Sensor name is: sensor.vitochargevx3_battery_discharge_today_from_can

i think if i would know how this sum is calculated or where its stored, i could fix it.

The sum isn’t stored separately from the individual hourly data.

Have you checked the CSV downloaded table for anomalies? That will at least narrow down the hour.

I have checked this and could not find any anomalies. I also tried using an AI to see if it would detected anything. Nothing

Sensor Values for the related period of time:

id,created,created_ts,metadata_id,start,start_ts,mean,min,max,last_reset,last_reset_ts,state,sum,mean_weight
4543886,599,2025-10-13 04:00:00,2025-10-13 05:00:10,,1.402,1248.20099999993,,,
4544429,599,2025-10-13 05:00:00,2025-10-13 06:00:10,,1.402,1248.20099999993,,,
4544972,599,2025-10-13 06:00:00,2025-10-13 07:00:10,,1.402,1248.20099999993,,,
4545515,599,2025-10-13 07:00:00,2025-10-13 08:00:10,,1.422,1248.2209999999297,,,
4546058,599,2025-10-13 08:00:00,2025-10-13 09:00:10,,1.536,1248.3349999999296,,,
4546601,599,2025-10-13 09:00:00,2025-10-13 10:00:10,,1.65,1248.4489999999294,,,
4547157,599,2025-10-13 10:00:00,2025-10-13 11:00:10,,1.653,1248.4519999999293,,,
4547713,599,2025-10-13 11:00:00,2025-10-13 12:00:10,,1.656,1248.4549999999292,,,
4548269,599,2025-10-13 12:00:00,2025-10-13 13:00:10,,1.659,1248.4579999999291,,,
4548825,599,2025-10-13 13:00:00,2025-10-13 14:00:10,,1.665,1248.463999999929,,,
4549381,599,2025-10-13 14:00:00,2025-10-13 15:00:10,,1.67,1248.4689999999289,,,
4549937,599,2025-10-13 15:00:00,2025-10-13 16:00:10,,2.377,1249.1759999999292,,,
4550493,599,2025-10-13 16:00:00,2025-10-13 17:00:10,,2.702,1249.5009999999293,,,
4551046,599,2025-10-13 17:00:00,2025-10-13 18:00:10,,3.022,1249.8209999999292,,,
4551599,599,2025-10-13 18:00:00,2025-10-13 19:00:10,,3.356,1250.1549999999297,,,
4552152,599,2025-10-13 19:00:00,2025-10-13 20:00:10,,3.684,1250.4829999999295,,,
4552705,599,2025-10-13 20:00:00,2025-10-13 21:00:10,,4.028,1250.8269999999297,,,
4553245,599,2025-10-13 21:00:00,2025-10-13 22:00:10,,4.342,1251.1409999999296,,,
4553785,599,2025-10-13 22:00:00,2025-10-13 23:00:10,,0.247,1251.45999999993,,,
4554318,599,2025-10-13 23:00:00,2025-10-14 00:00:10,,1.15,1252.36299999993,,,
4554851,599,2025-10-14 00:00:00,2025-10-14 01:00:10,,1.169,1252.38199999993,,,
4555384,599,2025-10-14 01:00:00,2025-10-14 02:00:10,,1.169,1252.38199999993,,,
4555924,599,2025-10-14 02:00:00,2025-10-14 03:00:10,,1.169,1252.38199999993,,,
4556464,599,2025-10-14 03:00:00,2025-10-14 04:00:10,,1.169,1252.38199999993,,,
4557004,599,2025-10-14 04:00:00,2025-10-14 05:00:10,,1.169,1252.38199999993,,,
4557547,599,2025-10-14 05:00:00,2025-10-14 06:00:10,,1.169,1252.38199999993,,,
4558090,599,2025-10-14 06:00:00,2025-10-14 07:00:10,,1.169,1252.38199999993,,,
4558633,599,2025-10-14 07:00:00,2025-10-14 08:00:10,,1.173,1252.38599999993,,,
4559176,599,2025-10-14 08:00:00,2025-10-14 09:00:10,,1.176,1252.3889999999299,,,
4559719,599,2025-10-14 09:00:00,2025-10-14 10:00:10,,1.224,1252.4369999999299,,,
4560275,599,2025-10-14 10:00:00,2025-10-14 11:00:10,,1.225,1252.4379999999298,,,
4560832,599,2025-10-14 11:00:00,2025-10-14 12:00:10,,1.228,1252.4409999999298,,,
4561389,599,2025-10-14 12:00:00,2025-10-14 13:00:10,,1.236,1252.4489999999296,,,
4561946,599,2025-10-14 13:00:00,2025-10-14 14:00:10,,1.239,1252.4519999999295,,,
4562503,599,2025-10-14 14:00:00,2025-10-14 15:00:10,,1.243,1252.4559999999294,,,
4563060,599,2025-10-14 15:00:00,2025-10-14 16:00:10,,1.626,1252.8389999999292,,,
4563617,599,2025-10-14 16:00:00,2025-10-14 17:00:10,,1.922,1253.1349999999295,,,
4564175,599,2025-10-14 17:00:00,2025-10-14 18:00:10,,2.162,1253.3749999999293,,,
4564725,599,2025-10-14 18:00:00,2025-10-14 19:00:10,,2.587,1253.7999999999292,,,
4565268,599,2025-10-14 19:00:00,2025-10-14 20:00:10,,2.921,1254.1339999999288,,,
4565811,599,2025-10-14 20:00:00,2025-10-14 21:00:10,,3.269,1254.4819999999286,,,
4566341,599,2025-10-14 21:00:00,2025-10-14 22:00:10,,3.591,1254.8039999999282,,,
4566871,599,2025-10-14 22:00:00,2025-10-14 23:00:10,,0.245,1255.119999999928,,,
4567399,599,2025-10-14 23:00:00,2025-10-15 00:00:10,,1.252,1256.1269999999279,,,
4567927,599,2025-10-15 00:00:00,2025-10-15 01:00:10,,1.567,1256.4419999999275,,,
4568455,599,2025-10-15 01:00:00,2025-10-15 02:00:10,,1.891,1256.765999999927,,,
4568983,599,2025-10-15 02:00:00,2025-10-15 03:00:10,,2.21,1257.0849999999266,,,
4569511,599,2025-10-15 03:00:00,2025-10-15 04:00:10,,2.58,1257.4549999999258,,,
4570041,599,2025-10-15 04:00:00,2025-10-15 05:00:10,,3.544,1258.418999999926,,,
4570574,599,2025-10-15 05:00:00,2025-10-15 06:00:10,,3.873,1258.7479999999262,,,
4571107,599,2025-10-15 06:00:00,2025-10-15 07:00:10,,4.088,1258.962999999926,,,
4571640,599,2025-10-15 07:00:00,2025-10-15 08:00:10,,4.106,1258.9809999999259,,,
4572173,599,2025-10-15 08:00:00,2025-10-15 09:00:10,,4.112,1258.9869999999257,,,
4572706,599,2025-10-15 09:00:00,2025-10-15 10:00:10,,4.179,1259.0539999999257,,,
4573252,599,2025-10-15 10:00:00,2025-10-15 11:00:10,,4.255,1259.1299999999258,,,
4573798,599,2025-10-15 11:00:00,2025-10-15 12:00:10,,4.257,1259.1319999999257,,,
4574344,599,2025-10-15 12:00:00,2025-10-15 13:00:10,,4.259,1259.1339999999257,,,
4574890,599,2025-10-15 13:00:00,2025-10-15 14:00:10,,4.262,1259.1369999999256,,,
4575436,599,2025-10-15 14:00:00,2025-10-15 15:00:10,,4.265,1259.1399999999255,,,
4575982,599,2025-10-15 15:00:00,2025-10-15 16:00:10,,4.73,1259.6049999999257,,,
4576528,599,2025-10-15 16:00:00,2025-10-15 17:00:10,,5.035,1259.9099999999253,,,
4577071,599,2025-10-15 17:00:00,2025-10-15 18:00:10,,5.358,1260.2329999999256,,,
4577614,599,2025-10-15 18:00:00,2025-10-15 19:00:10,,5.688,1260.5629999999255,,,
4578157,599,2025-10-15 19:00:00,2025-10-15 20:00:10,,6.023,1260.8979999999256,,,
4578700,599,2025-10-15 20:00:00,2025-10-15 21:00:10,,6.386,1261.2609999999252,,,
4579230,599,2025-10-15 21:00:00,2025-10-15 22:00:10,,6.708,1261.582999999925,,,
4579760,599,2025-10-15 22:00:00,2025-10-15 23:00:10,,0.894,1262.568999999925,,,
4580253,599,2025-10-15 23:00:00,2025-10-16 00:00:10,,1.228,1262.9029999999248,,,
4580788,599,2025-10-16 00:00:00,2025-10-16 01:00:10,,1.601,1263.275999999925,,,
4581323,599,2025-10-16 01:00:00,2025-10-16 02:00:10,,1.93,1263.6049999999254,,,
4581858,599,2025-10-16 02:00:00,2025-10-16 03:00:10,,2.453,1264.1279999999256,,,
4582393,599,2025-10-16 03:00:00,2025-10-16 04:00:10,,2.783,1264.4579999999257,,,
4582928,599,2025-10-16 04:00:00,2025-10-16 05:00:10,,3.72,1265.3949999999256,,,
4583469,599,2025-10-16 05:00:00,2025-10-16 06:00:10,,4.184,1265.8589999999258,,,