mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-26 10:17:18 +00:00
fix: #949
This commit is contained in:
committed by
Florian BEZANNIER
parent
2eb356fa9d
commit
47f22e8b83
@@ -123,9 +123,10 @@ class InitialSetup:
|
||||
"No vehicle in your account is compatible with this API, you vehicle is probably too old...")
|
||||
|
||||
for vehicle in self.user_info["vehicles"]:
|
||||
car = self.psacc.vehicles_list.get_car_by_vin(vehicle["vin"])
|
||||
if car is not None and "short_label" in vehicle and car.label == "unknown":
|
||||
car.label = vehicle["short_label"].split(" ")[-1] # remove new, nouvelle, neu word....
|
||||
if vin := vehicle.get("vin"):
|
||||
car = self.psacc.vehicles_list.get_car_by_vin(vin)
|
||||
if car is not None and "short_label" in vehicle and car.label == "unknown":
|
||||
car.label = vehicle["short_label"].split(" ")[-1] # remove new, nouvelle, neu word....
|
||||
self.psacc.vehicles_list.save_cars()
|
||||
|
||||
logger.info("\nYour vehicles: %s", res)
|
||||
|
||||
Reference in New Issue
Block a user