Volvo Cars integration

I’ve developed a custom integration for Volvo Cars! The supported models are limited to those compatible with the Volvo API.

Why?
The core integration does not work for my car (XC40 BEV 2024). From what I can tell based on the docs, my integration also has more entities (like charging connection, lock with reduced guard, separate light status entities and other diagnostics).

I’m also planning to include more features in upcoming releases, like:

  • Smart data refresh interval (so certain sensor will update faster when necessary)
  • Unit conversions (since Volvo API only reports in km and liters)

What’s included?

  • Support for multiple cars
  • Support for multiple accounts
  • Translations (currently only EN, so I might need some help on this :pray:)
  • Around 70 entities, including:
    • Binary sensors (diagnostics, doors, windows, engine, lights, tyres)
    • Sensors (energy/fuel consumption, distance to empty battery/tank, battery/fuel level, charging info, avg. speed, service info, odometer, trip meters)
    • Locks (lock/unlock, reduced guard mode)
    • Buttons (start/stop climatization and more)
    • Location (device tracking, including heading direction)
    • Images (interior, exterior)

For more details on features and installation, check out the repository! Feel free to create an issue, whether you’ve found a bug or have a feature request.

Current version:
GitHub release (with filter)

Add to your HACS:
Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Repository:

3 Likes

You might want to outline clearly the advantages of your custom component vs the builtin one, imo.

Thanks for the feedback! I’ve updated the opening post to include the reason why I made this custom integration.

Currently I’m using GitHub - Dielee/volvo2mqtt: Home Assistant addon for connecting AAOS Volvos. Apart from 1 being an add-on and relying on MQTT to integrate into HA, what’s the difference?

1 Like

I was actually using that add-on before. Let me first say that the goal with my integration isn’t to compete, like at all. I just want to offer an alternative.

I didn’t want to make a direct comparison, but since you’ve asked, here are some differences:

  • Like you said: no requirement on MQTT, but also built as an integration, which should be “less demanding” on resources than an add-on (which is a docker container in the end).
  • With my car, I count 44 entities with the volvo2mqtt add-on and 68 with my integration. Some entities also include additional information in the attributes, like reason why something is “a problem” (tyre pressure, levels, command results). All entities of my integration are listed on the repository page.
  • Support for multiple Volvo accounts.
  • Translatable (but requires help from the community)
  • The volvo2mqtt add-on currently offers unit conversion, but that is something that I’m planning to add as well. EDIT: HA handles this automatically. :heart_eyes:

You can run both side by side to see the differences. Just make sure to create an additional API key. And in the end, it all comes down to what you need and your personal preferences.

1 Like

It looks great! Volvo’s dev portal seems to be down atm, so Ive just replaced my Volvo2MQTT entities for now.

Nicely done, a few small requests to make it even better:

  • The formatting for the time to service + hours to service entities, I think the hours are no good to anyone :slight_smile:
  • The MQTT one has a (derived?) sensor for the state of the preheating, I used that for some visualization. Is that not available through the API?

Thanks for your insights!

The API reports time to service in days or months, so I’ve used days as unit value for the sensor. It seems the UI decides to express it in hours. I’ll have a look if that can be influenced somehow. Maybe by changing the device class?

Engine hours to service is reported back in hours by the API. I can convert it to days, but then anything less than 24h will be reported as 0 days. I also don’t know if it goes negative if you wait too long.

Do you mean the switch button? I don’t think that reports back the actual status. If you start preheating via the Volvo app, it won’t toggle the button to “on”. The API doesn’t return that information. That’s why I created buttons to start or stop the preheating.

When switching the button to “on”, volvo2mqtt does automatically stops the preheating after 30 minutes or when a door opens. I haven’t built in this automation, because I believe its up to the car and/or the user to decide what he wants.

1 Like

@jelmer I’ve just published v0.2.0-b1 with your suggested changes. Since it is a beta release, you’ll need to click “Redownload” in HACS and explicitly choose this version.

Both sensors will report the value in days now. Please note that I had to rename Engine hours to service to Engine time to service. You’ll need to remove the old entity manually.

I’m planning to include some other work before releasing the final v0.2.0. No worries if you want to wait for this.

I’ll give it a go!