Skip to content

Commit

Permalink
fix: fix range attributes from Teslamate (#759)
Browse files Browse the repository at this point in the history
closes #740
  • Loading branch information
dagstuan authored Nov 1, 2023
1 parent 302e49c commit cd55138
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/tesla_custom/teslamate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit cd55138

Please sign in to comment.