-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Add Volvo sensor documentation #38549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thomasddn
wants to merge
6
commits into
home-assistant:next
Choose a base branch
from
thomasddn:volvo/sensor
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
10a4479
Add Volvo sensor documentation
thomasddn 2a48e7d
Fix nitpick comments
thomasddn 5bec70e
Fix nitpick comments
thomasddn 4c8dad9
tiny style tweaks
c0ffeeca7 263e7ac
Update supported vehicles
thomasddn d939b6b
Small grammar changes
thomasddn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
--- | ||
title: Volvo | ||
description: Instructions on setting up Volvo within Home Assistant. | ||
ha_release: 2025.6 | ||
ha_iot_class: Cloud Polling | ||
ha_codeowners: | ||
- '@thomasddn' | ||
ha_domain: volvo | ||
ha_integration_type: integration | ||
ha_config_flow: true | ||
ha_category: | ||
- Sensor | ||
ha_platforms: | ||
- sensor | ||
ha_quality_scale: silver | ||
related: | ||
- url: https://developer.volvocars.com/ | ||
title: Volvo developers portal | ||
--- | ||
|
||
The **Volvo** {% term integration %} is used to integrate your [Volvo](https://www.volvocars.com/) vehicle. | ||
|
||
## Supported vehicles | ||
|
||
- All car models starting from model year 2015 (although some might have fewer features available). | ||
- Cars located in Europe, Middle East, Africa, US, Canada, and Latin America regions. Or view the [full list of countries](https://developer.volvocars.com/terms-and-conditions/apis-supported-locations/). | ||
|
||
## Prerequisites | ||
|
||
1. Head over to [Volvo's developer portal](https://developer.volvocars.com/) | ||
2. Make an account | ||
3. Go to the [API applications page](https://developer.volvocars.com/account/#your-api-applications) | ||
4. Create an "API application" and give it a meaningful name | ||
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
It's recommended to add an API application per vehicle you want to add. There is a maximum on the number of requests that can be made per API key per day. | ||
|
||
{% include integrations/config_flow.md %} | ||
|
||
{% configuration_basic %} | ||
API key: | ||
description: "Enter the API key obtained in the prerequisites steps." | ||
VIN: | ||
description: "If you have more than one car under this account then you can select the Vehicle Identification Number of the vehicle you wish to add." | ||
{% endconfiguration_basic %} | ||
|
||
## Configuration options | ||
|
||
You have the following configuration options if your model has a combustion engine: | ||
|
||
{% configuration_basic %} | ||
Fuel consumption unit: | ||
description: You can specify in which unit (L/100 km, mpg (UK), or mpg (US)) the fuel consumption should be displayed. | ||
{% endconfiguration_basic %} | ||
|
||
## Supported functionality | ||
|
||
The **Volvo** integration provides the following entities. | ||
|
||
### All engine types | ||
|
||
#### Sensors | ||
|
||
- **Car connection**: Connectivity of the car | ||
- **Distance to service**: Remaining distance until the next service maintenance | ||
- **Engine time to service**: Remaining engine-hours until the next service maintenance | ||
- **Odometer**: Odometer | ||
- **TA Avg. speed**: Average speed on the automatic trip meter | ||
- **TA Distance**: Total distance on the automatic trip meter | ||
- **Time to service**: Remaining time until the next service maintenance | ||
- **TM Avg. speed**: Average speed on the manual trip meter | ||
- **TM Distance**: Total distance on the manual trip meter | ||
|
||
### Battery only and Plug-in hybrid | ||
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#### Sensors | ||
|
||
- **Avg. energy consumption since charge**: Average energy consumption since the last charge of the battery | ||
- **Battery capacity**: Total capacity of the battery | ||
- **Battery charge level**: Current state of charge of the battery | ||
- **Distance to empty battery**: Electric range | ||
|
||
#### Sensors for specific models | ||
|
||
Go to Volvo's developer portal to view [the list of supported models](https://developer.volvocars.com/apis/energy/v1/overview/#availability). | ||
|
||
- **Charging connection status**: Charging connection status | ||
- **Charging limit**: Charging limit configured in the car | ||
- **Charging status**: Indication if the car is charging or not | ||
- **Est. charging time**: Estimated charging time to reach the target battery charge level | ||
- **TA Avg. energy consumption**: Average energy consumption on the automatic trip meter | ||
- **Target battery charge level**: Target battery charge level configured in the car | ||
- **TM Avg. energy consumption**: Average energy consumption on the manual trip meter | ||
|
||
### Fuel only and Plug-in hybrid | ||
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- **Distance to empty tank**: Fuel range | ||
- **Fuel amount**: Remaining fuel | ||
- **TA Avg. fuel consumption**: Average fuel consumption on the manual automatic meter | ||
- **TM Avg. fuel consumption**: Average fuel consumption on the manual trip meter | ||
|
||
## Examples | ||
|
||
### Estimated charging finish time | ||
|
||
The Volvo API only provides an estimated charging time (in minutes). To calculate the finish time, you can create a **Template sensor** helper with the template below. | ||
|
||
{% raw %} | ||
|
||
```jinja2 | ||
{% set charging_time = states('sensor.volvo_YOUR_MODEL_estimated_charging_time') | int(0) %} | ||
{% if charging_time > 0 -%} | ||
{% set new_time = now() + timedelta(minutes=charging_time) %} | ||
{{ new_time }} | ||
{%- else -%} | ||
{{ this.state }} | ||
{%- endif %} | ||
``` | ||
|
||
{% endraw %} | ||
|
||
Set the **Device class** to **Timestamp** and optionally choose your vehicle for **Device**. | ||
|
||
## Data updates | ||
|
||
The **Volvo** integration fetches data from the API every 135 seconds by default. | ||
If you decide to define a custom polling interval, beware that there is a maximum of 10.000 requests per day. | ||
Every poll operation accounts for about a dozen calls (depends on model). | ||
|
||
## Known limitations | ||
|
||
The official Volvo app has access to a more feature-rich API. As a result, this integration cannot provide live updates, display tyre pressure values, start air purifying, schedule climatization, show climatization status, and so on. | ||
|
||
## Troubleshooting | ||
|
||
### Recharge API | ||
|
||
#### Symptoms | ||
|
||
The **Volvo** {% term integration %} does not show recharge entities, or they are unavailable. | ||
This happens because sometimes the Volvo recharge API does not respond properly. | ||
|
||
#### Resolution | ||
|
||
The integration will automatically re-enable the recharge entities once the API becomes available again. | ||
|
||
## Removing the integration | ||
|
||
This integration follows standard integration removal. | ||
|
||
{% include integrations/remove_device_service.md %} | ||
|
||
After deleting the integration, go to the app of the manufacturer and remove the Home Assistant integration from there as well. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe 👀 Otherwise .8