Changes
🧰 Maintenance
-
fix(vehicle): only fetch data for discovered active services
Previously, the update() method called get_selectivestatus with a hardcoded list of services, regardless of whether they were discovered as active for the vehicle. This caused unnecessary API calls for services not available on the vehicle (e.g., TRIP_STATISTICS, FUEL_STATUS on ID. Series vehicles). Now the update() method: - Dynamically builds the service list based on discovered active services - Only calls get_parkingposition() if PARKING_POSITION is active - Only calls trip statistics methods if TRIP_STATISTICS is active - Reduces API overhead and prevents errors for unsupported services This improves efficiency and aligns with the service discovery logic.
Previously, the update() method called get_selectivestatus with a hardcoded list of services, regardless of whether they were discovered as active for the vehicle. This caused unnecessary API calls for services not available on the vehicle (e.g., TRIP_STATISTICS, FUEL_STATUS on ID. Series vehicles).
Now the update() method:
- Dynamically builds the service list based on discovered active services
- Only calls get_parkingposition() if PARKING_POSITION is active
- Only calls trip statistics methods if TRIP_STATISTICS is active
- Reduces API overhead and prevents errors for unsupported services
This improves efficiency and aligns with the service discovery logic.