Provider: show the electric range with the climate control on
MyToyota reports two range figures for an EV, and only one of them was reaching the readings: evRangeWithAc was listed as a fallback alias for evRange, so on a car that reports both — every bZ4X — the first key won and the second was never shown. It is its own reading now. The gap between the two is the useful part: it is what running the A/C costs you. Both are labelled for the pair, "Electric range (A/C off)" beside "Electric range (A/C on)", so neither figure is left ambiguous now that they sit next to each other. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bc798dae49
commit
2b6da642ad
5 files changed
+22
-5
No files matched your search
@@ -642,7 +642,12 @@ func headlineMetrics(trees []any) []providerMetric {
|
||||
{key: "fuelLevel", keys: []string{"fuelLevel", "fuelPercentage", "fuelRemainingPercent"}, unit: "%"},
|
||||
{key: "fuelRange", keys: []string{"fuelRange", "rangeRemaining", "drivingRange", "fuelRangeTotal"}, unit: "km", distance: true},
|
||||
{key: "batteryLevel", keys: []string{"batteryLevel", "chargeRemainingAmount", "stateOfCharge", "socLevel"}, unit: "%"},
|
||||
{key: "evRange", keys: []string{"evRange", "electricRange", "batteryRange", "evRangeWithAc"}, unit: "km", distance: true},
|
||||
{key: "evRange", keys: []string{"evRange", "electricRange", "batteryRange"}, unit: "km", distance: true},
|
||||
// Range with the climate control running, which Toyota reports beside the
|
||||
// plain one. Its own reading rather than a fallback for evRange: the two
|
||||
// are different numbers and the gap between them is the point — a driver
|
||||
// deciding whether to run the A/C wants to see both.
|
||||
{key: "evRangeWithAc", keys: []string{"evRangeWithAc"}, unit: "km", distance: true},
|
||||
}
|
||||
|
||||
out := []providerMetric{}
|
||||
|
||||
Reference in new issue
Block a user