Skip to content

Commit

Permalink
Merge branch 'vehicle-name' into framboos
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieB2B committed Dec 28, 2024
2 parents f6cf8f2 + 96d0998 commit 96a82c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/TWCManager/Vehicle/TeslaAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,9 @@ def update_vehicle_data(self, cacheTime=300):
url = (
"/".join([self.carapi.getCarApiBaseURL(), str(self.VIN), "vehicle_data"])
+ "?endpoints="
+ "%3B".join(["location_data", "charge_state", "drive_state"])
+ "%3B".join(
["location_data", "charge_state", "drive_state", "vehicle_state"]
)
)

now = time.time()
Expand All @@ -1525,6 +1527,8 @@ def update_vehicle_data(self, cacheTime=300):
self.batteryLevel = charge["battery_level"]
self.timeToFullCharge = charge["time_to_full_charge"]

self.name = response["vehicle_state"]["vehicle_name"] or self.name

self.lastVehicleStatusTime = now

return result
Expand Down

0 comments on commit 96a82c0

Please sign in to comment.