← All Integrations

Home Assistant

In Testing Electric Vehicle

Push state of charge, plug status and range from your own Home Assistant — no vendor account or API key, and it works with any vehicle Home Assistant can see. Read-only: pair it with a charger integration for the optimiser to act.

Getting Started

Home Assistant works the other way round from every other integration here: instead of Joule Genie signing in to a vendor cloud, your own Home Assistant pushes vehicle data to Joule Genie. There is no vendor account, no API key and nothing to authorise — so it works with any vehicle Home Assistant can already see, including ones with no Joule Genie integration of their own.

What it does, and what it does not

This integration reads your vehicle’s state of charge, and optionally whether it is plugged in, whether it is charging, its estimated range and its charging power. It cannot start or stop charging — nothing is sent back to Home Assistant. To have the optimiser act on what it learns, pair it with a charger integration such as Pod Point, Hypervolt or myenergi.

Step 1: Add the Integration in Joule Genie

Go to Settings > Integrations > Add Integration and choose Home Assistant from the Vehicle category. There are no credentials to type. When you save, Joule Genie shows an ingest URL unique to this integration and an ingest token. The token is displayed once and authenticates every push, so copy it before closing the panel.

Step 2: Add the REST Command to Home Assistant

The same panel generates a ready-made snippet with your URL and token already filled in — copy it with the button rather than retyping it. Paste the rest_command half into your configuration.yaml. It POSTs a small JSON payload to Joule Genie with an Authorization: Bearer header.

Before saving, change the sensor.my_car_* entity IDs in the payload to match your own vehicle’s entities. That mapping is the only part the snippet cannot do for you.

Step 3: Add the Automation

The second half of the snippet is an automation for automations.yaml that fires the command whenever your battery-level sensor changes. Point its trigger at the same entity you used in the payload. Pushing on change rather than on a timer keeps the data fresh without waking anything up.

Step 4: Reload and Verify

Reload your Home Assistant configuration, or restart it. Your vehicle appears on the Joule Genie dashboard as soon as the first push arrives — there is nothing to wait for on our side. If you want to force one, trigger the automation manually from Home Assistant’s developer tools.

What Joule Genie accepts

soc is required and must be a percentage between 0 and 100. charging, plugged_in, range_km and charge_power_w are all optional; send whichever your setup can produce. range_km must not be negative. Anything else in the payload is ignored.

Troubleshooting

  • The push returns 404. That single response covers a wrong token, an unknown integration ID and a disabled integration — deliberately, so that an ID cannot be probed from outside. Check the token first, then that the URL matches the one shown when you added the integration, then that the integration is still enabled in Settings.
  • The push returns 400. Either the payload was not valid JSON, or soc was missing or outside 0–100. A YAML indentation slip in the payload block is the usual cause.
  • State of charge reads 0%. The snippet’s float(0) filter turns an unavailable entity into a zero rather than an error, so a wrong entity ID shows as a flat 0% rather than a failure. Check the entity in Home Assistant’s developer tools.
  • Lost the token. Open the integration in Settings > Integrations and use Regenerate token. The old token stops working immediately, so update your Home Assistant config with the new one.
  • Nothing arrives at all. Your Home Assistant needs outbound internet access to reach Joule Genie. Check its logs for the rest_command call.

Vendor documentation

For the Home Assistant side of this, see the official rest_command documentation.

Don't have Home Assistant yet?

Register your interest and tell us what hardware you have. We're building integrations for the most popular UK energy products.

Check my kit →