Skip to content

thomasddn/ha-volvo-cars

Repository files navigation

Volvo Cars Home Assistant integration

This integration provides access to your Volvo car, provided your model and region are supported by Volvo's public API. This is not a one-to-one replacement for the official Volvo app, as the app has access to more resources than those available through the public API.

Supported regions include: Europe, the Middle East, and Africa. For a complete list of supported countries, check out Volvo's API documentation. However, users have reported it does work in the US and Brazil. So even if you're not in one of the listed countries, you might still get lucky!

Now check out the features section for details on what you'll get!

GitHub release CI main CI dev HACS Sponsor

Important

Coming over from volvo2mqtt? Hi! πŸ‘‹ Please read this.

✨ Features

General

  • Multiple cars
  • Multiple accounts
  • Translations (but need help on this πŸ™)

Entities

This integration will give you about 70 entities!

Note

Some entities may only be available if supported by your car.

Binary sensors

  • Diagnostics: car availability, service, washer fluid, brake fluid
  • Doors open/closed: front, back, hood, tailgate, tank lid
  • Engine status: running, coolant level, oil level
  • Light warnings: brakes, daytime lights, fog lights, hazard lights, high & low beam lights, position lights, registration plate, reverse light, side mark lights, turn indicators
  • Tyre pressure warnings
  • Windows open/closed: front, back, sunroof

Some sensors provide extra information in the attributes, like reason, pressure or level.

Buttons

  • Start/stop climatization
  • Flash
  • Honk
  • Honk & flash

The action's status is included in the attributes.

Tracking

  • Location tracking, including heading direction

Images

  • Multiple exterior images from different angles
  • Interior

Locks

  • Lock
  • Lock with reduced guard
  • Unlock

The action's status is included in the attributes.

Sensors

  • Energy and/or fuel consumption
  • Average speed
  • Fuel amount
  • Battery capacity
  • Battery charge level
  • Charging connection
  • Charging status
  • Estimated charging time
  • Distance to empty battery / tank
  • Distance to service
  • Engine hours to service
  • Time to service
  • Odometer
  • Trip meter

Additional entities

Entity Type Description
API status Sensor Gives an indication if the Volvo API is online.
API request counter Sensor Shows the number of requests made by this integration.
Data update interval Number Set the data update interval. Default is 135 seconds. Volvo gives you 10.000 requests a day (per API key), so you may want to do some math!
Update data Button Force a data refresh.

πŸ› οΈ Installation

Requirements

Install

Add this repository to your HACS with the following button:

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Install this integration with the follwing button:

Open your Home Assistant instance and start setting up a new integration.

Adding your car

Adding your car involves two steps. You'll need to repeat this process for each car you want to add, even if they are on the same account.

Remember to generate an API key for every car. There is a limit on the number of API requests per key.

Step 1: fill in credentials

Field Description
Username The username of your Volvo Id account.
Password The password of your Volvo Id account.
Vehicle Identification Number The VIN of the car you want to add.
Volvo API key The generated API key in the developer account.
Friendly name This value is used in the entity ID (volvo_[friendly name]_[key]). If left empty, VIN will be used.

After submitting, a One Time Password (OTP) will be sent to your email. It's a 6 digit number.

Step 2: OTP

Fill in the OTP to complete the process.

Options

Once a car has been added, you can configure additional options for it.

Option Description Availability
Volvo API key The generated API key in the developer account.
Fuel consumption unit You can choose between l/100km, mpg (UK) and mpg (US). Cars with a combustion engine.
Images transparent background Whether or not you want transparent a background for the exterior images. Depending on the image URL provided by the Volvo API.
Images background color Choose the background color for the exterior images. Depending on the image URL provided by the Volvo API.

πŸ›Ÿ Need help?

Make sure to read the FAQ first. Maybe the topic is covered there.

If you have a feature request or encounter a problem, feel free to open an issue! Have a general question, need help setting up, or want to show off your Volvo dashboard? Go to the discussions.

You can also join the thread on the HA community.

🀝 Contributing

General

To everyone who tested, broke things, reported bugs, shared ideas, and gave feedback β€” y'all are the dream team! πŸ™Œ

If you stumble upon a bug, or have an idea to improve this integration, you may always submit a pull request.

Translations

Would you like to see the labels in your own language? Or perhaps you've spotted a typo or grammatical error that needs fixing? Hop over to the Lokalise project to manage translations. Alternatively you can create a "translation" issue to request a change.

Thanks for the idea, ivanfmartinez! πŸ”‘

Testing

Shoutout to Pau1ey for testing and confirming this! 🀩

  • Test if you have multiple Volvos across different accounts.
  • Test with other Volvo models (non-BEV).
  • Users that use imperial system.

Both timthorn and dalvald rocking two cars on the same account, what a flex! πŸ’ͺ

  • Test if you have multiple Volvos on the same account.

πŸ₯€ Powered by snacks

When I'm coding, I run on coffee, Coca-Cola*, and Lays* potato chips. If you'd like to show your appreciation for this project, consider making a small donation to help keep my stash stocked! (Note: I'm also happy to accept 1,000,000 USD β€” or EUR, I'm not picky. 😁)

ko-fi

* No affiliation with these brands β€” just personal favorites!