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.
-
feat: Only load configured vehicle during login
Add optional
vinparameter todoLogin()to load only the specified vehicle instead of all vehicles in the account. This prevents unnecessary API calls for unconfigured vehicles.- Connection.doLogin() now accepts optional vin parameter
- Home Assistant integration passes configured VIN during login
- Config flow still loads all vehicles (vin=None) for selection
- Reduces backend API load when user has multiple vehicles