From 5d53a4bb71384b4611a09e40d5ea5f809431796b Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 19 Oct 2023 08:55:33 +0800 Subject: [PATCH] &battery_level: Return {usable_battery_level} - that is what the phone app shows --- lib/Tesla/Vehicle.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Tesla/Vehicle.pm b/lib/Tesla/Vehicle.pm index 5cf0865..8745c0f 100644 --- a/lib/Tesla/Vehicle.pm +++ b/lib/Tesla/Vehicle.pm @@ -236,7 +236,7 @@ sub speed { # Charge State Methods sub battery_level { - return $_[0]->data->{charge_state}{battery_level}; + return $_[0]->data->{charge_state}{usable_battery_level}; } sub charge_amps { return $_[0]->data->{charge_state}{charge_amps};