A Better Routeplanner

The A Better Routeplanner (ABRP) integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] connects your ABRP account to Home Assistant, so you can monitor your electric vehicles in one place.

Use cases

Use this integration to track battery level and range, then use that data in dashboards and automations.

You can also send data from Home Assistant to ABRP with an action, for example the state of charge from your vehicle’s own integration, so ABRP plans routes from the right starting point.

Supported devices

This integration works with electric vehicles supported by the A Better Routeplanner cloud service and added to your ABRP garage.

ABRP supports many models across brands like Tesla, Rivian, Hyundai, Kia, BMW, Audi, Mercedes-Benz, Ford, Volkswagen, Polestar, and Volvo.

The integration does not connect to your vehicle directly. It uses the telemetry ABRP already has for your vehicle.

Unsupported devices

  • Non-electric vehicles.
  • Vehicles that are not added to your ABRP garage.

Prerequisites

  • An A Better Routeplanner account.
  • At least one vehicle in your ABRP garage.
  • The Home Assistant Link integration loaded. It is included in default_config:, which is enabled by default. If you removed default_config: from your configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more], add cloud: instead.

Configuration

To add the A Better Routeplanner hub to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

  • Browse to your Home Assistant instance.

  • Go to Settings > Devices & services.

  • In the bottom right corner, select the Add Integration button.

  • From the list, select A Better Routeplanner.

  • Follow the instructions on screen to complete the setup.

During setup, you sign in to ABRP and every vehicle in your ABRP garage is added to Home Assistant. Sign-in uses account linking provided by Home Assistant Link. This service is free and does not require a Home Assistant Link subscription, so you do not need API credentials or a developer app.

To monitor vehicles from more than one ABRP account, add the integration once for each account.

Supported functionality

Each vehicle in your ABRP garage is added as one Home Assistant device.

Telemetry entities are added as data becomes available. If ABRP has not received a specific metric yet, that entity appears after the first update.

Device card model name

The device card shows a human-friendly vehicle name when ABRP has a catalog match. If no match is available, Home Assistant falls back to ABRP’s raw type code identifier.

Sensors

  • SoC: Battery charge percentage. For details, refer to State of charge and state of energy.

  • SoE: Estimated battery energy, shown in kilowatt-hours (kWh) by default. For details, refer to State of charge and state of energy.

  • Range: Estimated remaining driving range.

  • Power: Current charging or discharging power.

  • HVAC power: Power used by heating and air conditioning.

  • Charging state: Whether the vehicle is charging and how. Possible states are:

  • Charging state: Whether the vehicle is charging and how. For details, refer to AC and DC charging. Possible states are:

    • Charging (AC): The vehicle is charging from an AC charger.
    • Charging (DC): The vehicle is charging from a DC fast charger.
    • Charging: The vehicle is charging, but the charging type is unknown.
    • Plugged in: The vehicle is connected to a charger but not charging.
    • Not charging: The vehicle is not charging and is not reported as plugged in.
  • Voltage: Battery pack voltage.

  • Current: Battery pack current.

  • Battery temperature: Battery pack temperature.

  • Minimum battery temperature: Lowest battery cell temperature. This sensor is disabled by default.

  • Maximum battery temperature: Highest battery cell temperature. This sensor is disabled by default.

  • Cabin temperature: Temperature inside the vehicle.

  • External temperature: Outside air temperature.

  • Driving state: The gear the vehicle is in. Possible states are:

    • Park
    • Reverse
    • Neutral
    • Drive
  • Odometer: Total distance driven.

  • Calibrated ref cons: ABRP’s calibrated reference consumption for the vehicle, in energy per distance. A steady-state baseline tuned from live data, not real-time consumption.

  • State of health: Estimated battery health percentage.

  • Battery capacity: Estimated usable battery capacity.

State of charge and state of energy

The SoC and SoE sensors both describe how full your battery is, but they measure it in different ways.

  • SoC (state of charge) is the battery level as a percentage of the total usable battery. A value of 80 means the usable battery is 80% full.
  • SoE (state of energy) is the amount of energy left in the battery, in kilowatt-hours (kWh). A value of 45 means about 45 kWh is available.

Use SoC for simple battery-level automations, like a notification when the battery is low. Use SoE when you want the amount of energy instead of a percentage.

ABRP reports these values from your vehicle’s data source, so a vehicle might report one and not the other. A sensor appears after ABRP receives its first value.

AC and DC charging

The Charging state sensor reports whether your vehicle is charging. When ABRP knows the charging type, the sensor also reports it.

  • Charging (AC): The vehicle is charging with alternating current (AC), for example from a wall box or a public AC charge point. The vehicle’s onboard charger converts AC to the DC power the battery needs.
  • Charging (DC): The vehicle is charging with direct current (DC), from a DC fast charger. The charger supplies DC power directly to the battery.
  • Charging: The vehicle is charging, but ABRP does not know the charging type.

The other states, Plugged in and Not charging, do not describe a charging type. ABRP reports the state from your vehicle’s data source, so the available states depend on what your vehicle shares.

You can use the charging state in automations, for example to be notified when your vehicle starts DC fast charging.

Device tracker

  • Location: The last known GPS location of the vehicle. It is added when the vehicle first reports a position and is listed under Diagnostic on the device page.

Controls

The integration does not control your vehicle. It does not provide vehicle control actions like start charging, stop charging, climate control, or lock and unlock.

List of actions

The A Better Routeplanner integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following actions. Each link below opens a dedicated page with examples, parameters, and a step-by-step UI walkthrough.

  • Send telemetry (abrp.send_telemetry) Sends a telemetry point for a vehicle to A Better Routeplanner.

For an overview of every action across all integrations, see the actions reference.

A Better Routeplanner automation examples

With your vehicle’s battery data in Home Assistant, you can react to charge levels in your automations. Here are a few ideas to get you started.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the visual automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.

Automation: Notify when the battery drops below 20%

Get a notification on your phone when your vehicle’s battery level drops below 20%, so you remember to charge it.

  • Trigger: Numeric state crossed threshold
    • Entity: The SoC sensor of your vehicle
    • Below: 20
  • Action: Send a notification message
    • Target: My phone
YAML example for a low battery notification
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Notify low battery"
triggers:
  - trigger: numeric_state
    entity_id: sensor.my_ev_soc
    below: 20
actions:
  - action: notify.send_message
    target:
      entity_id: notify.my_phone
    data:
      message: "Battery low: {{ states('sensor.my_ev_soc') }}% remaining."

Automation: Turn off a charging outlet above 80%

Stop charging once your vehicle’s battery level goes above 80% by turning off the smart outlet or switch that powers your charger. The automation runs when the SoC value rises past 80, so a reading of exactly 80% does not turn off the outlet.

  • Trigger: Numeric state crossed threshold
    • Entity: The SoC sensor of your vehicle
    • Above: 80
  • Action: Turn off switch
    • Target: The switch for your charging outlet
YAML example for turning off a charging outlet above 80%
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Stop charging above 80%"
triggers:
  - trigger: numeric_state
    entity_id: sensor.my_ev_soc
    above: 80
actions:
  - action: switch.turn_off
    target:
      entity_id: switch.garage_ev_outlet

Automation: Send the state of charge from another integration to ABRP

If your vehicle’s own integration reports the battery level, forward it to ABRP every time it changes, so route planning always starts from the current value.

  • Trigger: State
    • Entity: The battery level sensor from your vehicle’s integration
    • To: Any state (ignoring attribute changes)
  • Condition: Template
    • Value template: {{ is_number(trigger.to_state.state) }}
  • Action: Send telemetry
    • Vehicle: Your vehicle in ABRP
    • State of charge: {{ trigger.to_state.state | float }}. The number field doesn’t accept a template, so select Edit in YAML on the action to enter it.
YAML example for sending the state of charge to ABRP
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Send battery level to ABRP"
triggers:
  - trigger: state
    entity_id: sensor.my_ev_battery_level
    to:
conditions:
  - condition: template
    value_template: "{{ is_number(trigger.to_state.state) }}"
actions:
  - action: abrp.send_telemetry
    data:
      vehicle: 0d462c0c4c0b064b1a91cdbd1ffcbd31
      soc: "{{ trigger.to_state.state | float }}"

Data updates

Telemetry is pushed from ABRP in near real time when ABRP receives vehicle updates. If the live stream connection drops, the integration reconnects automatically.

Each sensor shows the newest value ABRP has for your vehicle. Some telemetry, like power and voltage, only changes while your vehicle is actively reporting, usually while driving or charging.

The device tracker updates when ABRP receives a new position for your vehicle.

The integration also checks your ABRP garage every hour. New vehicles, including vehicles shared with you, are added automatically, and their sensors appear when the vehicle first reports data. If you rename a vehicle in ABRP, its device name updates too, unless you renamed the device in Home Assistant. Vehicles that leave your garage are removed automatically. For details, see Removing a vehicle.

Known limitations

Vehicle controls

The integration does not control your vehicle. It can send telemetry to ABRP, but not commands to the vehicle. To send commands to your vehicle, use the manufacturer integration for your vehicle, such as Tesla Fleet, Volvo, Renault, Nissan Leaf, or Subaru. The available commands, like charging, climate control, or locking, depend on the manufacturer integration and your vehicle.

Telemetry availability

Data freshness and accuracy depend on ABRP and your vehicle manufacturer data source. Which sensors a vehicle gets depends on the data ABRP receives for it, so some vehicles never get certain sensors. Some entities appear only after the first value is received.

Vehicle location

The location is shown as ABRP reports it. For vehicles without a direct connection to ABRP, the position can come from the ABRP phone app, so the device tracker shows your phone’s location instead.

Vehicle make and model

If ABRP cannot provide the make and model for a vehicle, its device shows ABRP’s raw vehicle type code instead. The hourly garage check updates the device when the make and model become available.

Route planning

Route planning details, like destinations and charging stops, are not exposed.

Troubleshooting

A sensor is missing for one of my vehicles

If a sensor is missing, ABRP has usually not received that metric yet.

To resolve this issue:

  1. Drive the vehicle or start charging.
  2. Wait for ABRP to receive fresh telemetry.
  3. Check Home Assistant again. New entities are added automatically.

Authentication errors

If ABRP no longer accepts your sign-in, the entities become unavailable and Home Assistant asks you to sign in again.

To resolve this issue:

  1. Confirm you can log in to your account at the A Better Routeplanner website.
  2. Go to Settings > Devices & services.
  3. Under Attention required, select Reconfigure on the A Better Routeplanner card, then confirm.
  4. Sign in with the same ABRP account. If you sign in with a different account, re-authentication stops. To try again, select the three dots menu next to the entry, select Reload, then select Reconfigure again.

After you sign in, the integration reloads and your entities update again.

Setup stops with a message about default_config

If setup stops and asks you to run Home Assistant with default_config enabled, the Home Assistant Link integration is not loaded. Add default_config: or cloud: to your configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more], restart Home Assistant, and add the integration again.

Sensor states appear stale

This is expected when a vehicle is parked and not reporting data. Each sensor keeps showing the newest value ABRP has.

Home Assistant shows the same data as the A Better Routeplanner app and website, so you can compare them. If the value looks just as old in ABRP, your vehicle has not sent fresh telemetry yet and there is nothing to fix in Home Assistant.

Entities show as unavailable

Entities become unavailable when the integration can no longer authenticate with ABRP. To fix this, follow the steps in Authentication errors. If ABRP cannot be reached when Home Assistant starts, entities stay unavailable until the integration connects. It retries automatically. During an ordinary connection interruption, entities keep their latest values while the integration reconnects.

If the issue continues, enable debug logging, reproduce the issue, and include the logs in your issue report.

Community notes

If you need help, use the Home Assistant Community forums and share debug logs and details when possible.

Removing the integration

This integration follows the standard integration removal process.

To remove an integration instance from Home Assistant

  1. Go to Settings > Devices & services and select the integration card.
  2. Next to the entry you want to remove, select the three dots menu. Then, select Delete.
    • Depending on the integration, the entries are listed under one of the following headings:
      • Devices
      • Hubs
      • Services
      • Integration entries
  3. To confirm, select Delete.
    • Home Assistant also deletes the devices and entities of the entry.
  4. If Home Assistant asks you to restart, restart Home Assistant.
  5. If Home Assistant asks whether to also delete the application credentials, select Remove or Keep.

Removing a vehicle

When a vehicle leaves your ABRP garage, Home Assistant removes its device and entities automatically. This happens when you remove the vehicle from your garage, or when the owner stops sharing it with you.

Home Assistant checks your garage when the integration loads and every hour after that, so removal can take up to about an hour. If ABRP cannot be reached during a check, nothing is removed.

If you removed all vehicles from your ABRP garage, Home Assistant does not remove them automatically. In that case, remove the integration entry for that ABRP account.

If you set up more than one ABRP account and a vehicle is shared with several of them, the vehicle is only removed from the account whose garage it left.

If the vehicle comes back to your garage, it is added again at the next garage check.