Battery Health Issue with Model S appears to use Ideal Efficiency and not Rated Efficiency, causing far too high an 'old' capacity #3486
Description
Is there an existing issue for this?
- I have searched the existing issues
What happened?
(I don't know how to escalate a Discusiion to an Issue, so here we go) The issue is described in Discussion:
#3470
)
My Tesla Model S 70D Y2015, which has approx 68,8/67,2kWh Usable from new, is reported with 'original' capacity in excess of 83 kWh
Assuming the
('$aux'::json -> 'RatedEfficiency')::text::float
is in effect the Ideal Efficiency of 190Wh/km instead of the Rated Efficiency of 150Wh, I changed the Graph Query to:
and that produces proper 'old' capacity numbers (which for me is around 66.1kWh because I started using Teslamate as late as at odeometer=70kKm). So the :
Below is not a proper fix, the right solution is to update the ('$aux'::json -> 'RatedEfficiency')::text::float to be correct!
SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer,
AVG(c.ideal_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS "kWh",
MAX(cp.id) AS id,
to_char(cp.end_date, 'YYYY-MM-dd') AS Title
FROM charging_processes cp
JOIN (SELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges ON cp.id = last_charges.charging_process_id
INNER JOIN charges c
ON c.charging_process_id = cp.id AND c.date = last_charges.date
INNER JOIN positions p ON p.id = cp.position_id
WHERE cp.car_id = $car_id
AND cp.end_date IS NOT NULL
AND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float
GROUP BY 4
Expected Behavior
Steps To Reproduce
Open Teslamate
Navigate to Dashboards/Battery Health
Relevant log output
None
Screenshots
Additional data
No response
Type of installation
Docker
Version
v1.27.4