Connect your compatible vehicle to Home Assistant using the Smartcar API.
This integration provides various sensors and controls for vehicles linked through the Smartcar platform, allowing you to monitor and interact with your car directly within Home Assistant.
Note: This integration relies on the Smartcar service. Availability of specific features depends on your vehicle's make, model, year, your Smartcar account plan (especially API rate limits), and the permissions granted during authentication.
Example showing entities for a Volkswagen ID.4
Provides the following entities for each connected vehicle (subject to vehicle compatibility and granted permissions):
- Device Tracker:
- Location (GPS)
- Sensors:
- Odometer
- Battery Level (percentage)
- Estimated Range
- Battery Capacity (kWh)
- Charging Status (Charging, Not Charging, Fully Charged)
- Engine Oil Life (percentage) (if supported)
- Tire Pressures (if supported)
- Fuel Level / Range (if supported)
- Binary Sensors:
- Charging Cable Plugged In
- Switches:
- Start/Stop Charging
- Number:
- Set Charge Limit (percentage)
- Locks:
- Door Lock/Unlock (note: known compatibility issues with some models, e.g., VW ID.4 2023+ does not have this functionality)
- Compatible Vehicle: Your car must be compatible with Smartcar and the API must also be supported in your country.
- Smartcar Developer Account: You need a free developer account from Smartcar.
- Go to developer.smartcar.com and sign up.
- Log in to your Developer Dashboard.
- Ensure a Smartcar Application exists:
- In the dashboard, go to "Applications" and ensure an application was automatically created for you.
- Rename your application if you want to (e.g., "Home Assistant Connect").
Recommended: HACS
- Ensure HACS (Home Assistant Community Store) is installed.
- Go to HACS -> Integrations -> Click the three dots (⋮) in the top right -> Custom Repositories.
- Enter the URL of this GitHub repository,
https://github.com/tube0013/Smartcar-HA
, in the "Repository" field. - Select "Integration" as the category.
- Click "Add".
- The "Smartcar" integration should now appear in the HACS list. Click on it and then click "Download".
- Confirm the download.
- Restart Home Assistant (Settings -> System -> Restart).
Manual Installation
- Download the latest release source code archive (
.zip
or.tar.gz
). - Unpack the archive.
- Copy the
custom_components/smartcar/
directory into your Home Assistant<config>/custom_components/
directory. Createcustom_components
if it doesn't exist. - Restart Home Assistant (Settings -> System -> Restart).
Configuration is done via the Home Assistant UI after installation.
- Navigate to "Settings" → "Devices & Services"
- Click "+ Add Integration"
- Search for and select → "Smartcar"
Or you can use the My Home Assistant Button below.
Follow the instructions to configure the integration.
-
Choose a name for your credentials and enter the Client ID and Client Secret which can be found in the Smartcar dashboard.
-
Crucially, set the "Redirect URIs" in the Smartcar settings for your application. You need to add exactly the URI your Home Assistant instance uses for OAuth callbacks.
- Most users will simply use the My Home Assistant URI:
https://my.home-assistant.io/redirect/oauth
Note: This is not a placeholder. It is the URI that must be used unless you’ve disabled or removed the
default_config:
line from your configuration and disabled the My Home Assistant Integration. - Add only the correct URI for your setup.
- Most users will simply use the My Home Assistant URI:
-
Continue to the next step.
-
Select the Permissions you want Home Assistant to be able to access. To enable all entities in this integration, select all relevant permissions:
- Get total distance traveled
- Get the vehicle's location
- Get EV/PHEV battery level, capacity & current range
- Get details on whether the car is plugged in and charging
- Get details on whether doors, windows & more are enabled
- Get engine oil health*
- Get tire pressure details*
- Get fuel tank level*
- Control charging (start/stop & target charge)
- Lock or unlock vehicle
* These may not work depending on car support
-
Continue to the next section which explains the steps to authorize your vehicle via Smartcar connect.
- You will be redirected to the Smartcar website (or a new tab will open).
- Log in using the credentials for your vehicle's connected services account (e.g., your Volkswagen ID, FordPass account, Tesla account), NOT your Smartcar developer account credentials.
- Review the permissions requested by Home Assistant (these should match the scopes you selected when creating the Smartcar application).
- Grant access to allow Home Assistant to connect to your vehicle(s) via Smartcar.
- You should be redirected back to Home Assistant.
If successful, the integration will be added, and Home Assistant will create devices and entities for your connected vehicle(s). From here:
- Enable entities you want access after understanding the impact on rate limits.
- Consider creating a customized polling setup via automations.
- Smartcar's free developer tier typically has a limit of 500 API calls per vehicle per month. Exceeding this may incur costs or stop the integration from working.
- By default, it uses 6 hour polling interval and only fetches data required for enabled entities.
- Polling can be customized as well.
To customize polling, you can disable polling on the integration and write your own automation.
- First, configure the integration as described above.
- Go to Settings → Integartions (under Devices & services) → Smartcar
- Click the three dots to the right of the integration.
- Choose System options.
- Disable Enable polling for changes and then click Save.
- Create an automation using
homeassistant.update_entity
to refresh the desired value(s). Examples are provided:
examples/poll-smartcar-simple.yaml
examples/poll-smartcar-custom.yaml
examples/poll-smartcar-excessive.yaml
- Vehicle Compatibility: Not all features are supported by all vehicle makes/models/years via the Smartcar API. Entities for unsupported features (e.g., Lock control for VW ID.4 2023+) may or may not be created. Check the Smartcar compatibility details for your specific vehicle.
- API Latency: There can be significant delays (seconds to minutes) between sending a command (e.g., start charging) and the vehicle executing/reporting the change back through the API. The state in Home Assistant will update after the next successful data poll.
- Rate Limits: Be mindful of the 500 calls/vehicle/month limit on the free tier.
Please report any issues you find with this integration by opening an issue on the GitHub Issues page.