use usable soc to match display and tesla app (#2738)

This commit is contained in:
Michael Geers 2022-02-28 17:25:41 +01:00 • committed by GitHub
parent 560cdeb0d7
commit 735e68e5b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,7 +115,7 @@ func (v *Tesla) SoC() (float64, error) {
res, err := v.chargeStateG()
if res, ok := res.(*tesla.ChargeState); err == nil && ok {
return float64(res.BatteryLevel), nil
return float64(res.UsableBatteryLevel), nil
}
return 0, err