Skip to content

Commit

Permalink
Fix services bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed May 15, 2024
1 parent 2a1d38e commit 772e17a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/teslemetry/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def async_get_vehicle_for_entry(
) -> TeslemetryVehicleData:
"""Get the vehicle data for a config entry."""
assert device.serial_number is not None
for vehicle in hass.data[DOMAIN][config.entry_id].vehicles:
for vehicle in config.runtime_data.vehicles:
if vehicle.vin == device.serial_number:
return vehicle
raise ServiceValidationError(f"No vehicle data for device ID: {device.id}")
Expand Down

0 comments on commit 772e17a

Please sign in to comment.