Repository navigation
Conversation
Preview build
|
2f7307a to
db43fb9
Compare
An MG ZS EV (issue #551) adds 33 to 35 kWh to drivetrain/powerUsageOfDay at some polls while parked, so a 4 km day read 134 kWh and 47040 Wh/km. Its powerUsageSinceLastCharge comes out of the same charge status message and matches the state of charge drop to the hundredth, so it is the reference. - DailyStatsBuilder compares the two counters per day: their rises within runs without a reset, and on a day without a charge the day total against what had left the battery since the last charge. DailyStat gains SinceChargeTotal (the day off the since-last-charge counter, starting from the last reading before the day) and CounterUnbacked. - utils/energy picks the figure: a plug-in day the API flags falls back to the since-last-charge total; a hybrid stays on its day counter. - The live kWh-today and Wh/km cards hide a day counter that holds more than left the battery since a charge that was not today. Refs #551 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Show energy per distance as kWh/100 km (kWh/100 mi in miles) instead of Wh/km. - DailyStat carries the day's distance off the car's distance-of-the-day counter, read like the energy counter, so the two pair up. - Statistics: new Energy used and Efficiency insights, an efficiency line on the energy chart (right-hand axis), an efficiency column in the month table. Distance in period and the month distance come from the car's own count, falling back to trips for a car that reports none. - Dashboard: Efficiency since charge card off the since-last-charge counters; Since charge and Efficiency renamed to say what they show. - Clearer chart and table wording in English and Dutch. - Demo: one walk over the demo trips (and a generated commute before them) drives the odometer, day counters, since-last-charge counters and state of charge, so the demo statistics agree with each other; trips start at a time of day; today is in the history. Refs #551 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A test that turns colourful maps on saves the settings store 300 ms later. On a slow runner that save lands after the next test's localStorage.clear(), and the next test's store starts with colourful maps on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The branch was rebased onto main after the Spanish locale landed (#568), and es.json lacked the keys this PR adds, which broke the type-check and the pr-569 image build. Also follows the renamed English labels (Energy used, Efficiency today, kWh/100 km). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stics A ZS EV that charged during an 82 km day showed 118.1 kWh and 144.1 kWh/100 km on the dashboard, while the statistics page showed 17.9 kWh and 21.8 kWh/100 km. The dashboard's own check on the live counter stands aside for 24 hours after a charge, because the since-last-charge counter then no longer covers the whole day. The dashboard now also loads today's statistics row, refreshed with every new status, and takes its verdict: when the API found the day counter rising past the since-last-charge counter, the energy today and efficiency today cards show that day's since-last-charge total, as the statistics do. The live check stays as a fallback until the row arrives and for a reading the row does not cover yet. Only plug-in cars load it. Refs #551 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
99fd106 to
ad72315
Compare
Contains the commit from #556 (the day counter check), so the
test-buildpreview from this PR has both the day counter check and the clearer statistics. #556 is closed in favour of this PR, and nothing merges until the tester on #551 confirms.Why
The reporter on #551 found the statistics hard to read: "Electric usage per day" with no way to relate it to distance, efficiency only in Wh/km, and a "Since charge" card that shows a distance. Demo mode showed the same problem: its distance came from the trips (186 km in 30 days) and its energy from an unrelated history (about 300 kWh), which reads as 1.6 kWh/km.
What changes
Units
Statistics
DailyStat.DistanceKm: each day's distance off the car's distance-of-the-day counter, read the same way as the energy counter (a finished day's peak, today's rise). No database change.Dashboard
Wording (English and Dutch)
Demo
DemoHistorybuilds the history in one pass over a single list of drives: the demo trips for the last five weeks, a generated commute before that. The odometer, day counters, since-last-charge counters, state of charge and overnight charges all come from that pass, so the demo statistics agree with each other and with the trip log's odometer. The live snapshot continues from where the history ends.Checks
dotnet test: 1583 total, 0 failed.dotnet format --verify-no-changesis clean.vue-tsc --build, 1308 unit tests, oxlint/eslint/stylelint, prettier all pass.Refs #551
🤖 Generated with Claude Code