skodaconnect / myskoda

Python library for interacting with MySkoda APIs.
MIT License
9 stars 22 forks source link

Invalid carType for Superb iV #69

Closed fursov closed 1 month ago

fursov commented 1 month ago

2024-09-30 09:50:40.247 ERROR (MainThread) [myskoda.rest_api] Failed to load data from url /v2/vehicle-status/XXXXXXX/driving-range. Return value was '{"carType":"hybrid","totalRangeInKm":677,"primaryEngineRange":{"engineType":"gasoline","currentSoCInPercent":77,"currentFuelLevelInPercent":77,"remainingRangeInKm":670},"secondaryEngineRange":{"engineType":"electric","currentSoCInPercent":25,"remainingRangeInKm":7},"carCapturedTimestamp":"2024-09-30T06:50:07Z"}' ValueError: 'hybrid' is not a valid EngineType

I have prepared the fix but I have a question:

what do you think, should I reuse EngineType enumeration and add "hybrid" there, or would it be better to introduce new CarType enumeration and repeat all fields from EngineType? @Prior99 @WebSpider @dvx76

WebSpider commented 1 month ago

We already have a Vehicle, i dont see the added value of adding a Car