From cd55138c4607e337c8584fe1176f03b02504d160 Mon Sep 17 00:00:00 2001 From: Dag Stuan Date: Wed, 1 Nov 2023 07:04:38 +0100 Subject: [PATCH] fix: fix range attributes from Teslamate (#759) closes #740 --- custom_components/tesla_custom/teslamate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/tesla_custom/teslamate.py b/custom_components/tesla_custom/teslamate.py index 74c4e668..be6c0675 100644 --- a/custom_components/tesla_custom/teslamate.py +++ b/custom_components/tesla_custom/teslamate.py @@ -138,8 +138,9 @@ def cast_car_state(state: str, car: TeslaCar) -> (str, str): MAP_CHARGE_STATE = { "battery_level": ("battery_level", float), - "est_battery_range_km": ("battery_range", cast_km_to_miles), - "usable_battery_level": ("usable_battery_level", float), + "rated_battery_range_km": ("battery_range", cast_km_to_miles), + "est_battery_range_km": ("est_battery_range", cast_km_to_miles), + "ideal_battery_range_km": ("ideal_battery_range", cast_km_to_miles), "charge_energy_added": ("charge_energy_added", float), "charger_actual_current": ("charger_actual_current", int), "charger_power": ("charger_power", int),