Skip to content

Commit

Permalink
key fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tillsteinbach committed Jan 14, 2025
1 parent a5210c6 commit bfd902a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/carconnectivity_connectors/volkswagen/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def fetch_vehicle_status(self, vehicle: VolkswagenVehicle) -> None:
vehicle.odometer._set_value(None) # pylint: disable=protected-access
if 'fuelStatus' in data and data['fuelStatus'] is not None:
if 'rangeStatus' in data['fuelStatus'] and data['fuelStatus']['rangeStatus'] is not None:
if 'value' in data['measurements']['rangeStatus'] and data['fuelStatus']['rangeStatus']['value'] is not None:
if 'value' in data['fuelStatus']['rangeStatus'] and data['fuelStatus']['rangeStatus']['value'] is not None:
range_status = data['fuelStatus']['rangeStatus']['value']
if 'carCapturedTimestamp' not in range_status or range_status['carCapturedTimestamp'] is None:
raise APIError('Could not fetch vehicle status, carCapturedTimestamp missing')
Expand Down

0 comments on commit bfd902a

Please sign in to comment.