Your Tesla belongs in your smart home – battery level on the dashboard, excess solar charging with your PV system, or the garage door that opens when you arrive. With Home Assistant this is surprisingly easy once you pick the right API and integration. The essential basics, without assuming any developer knowledge.
At a Glance
- Which API? Use the Fleet API – it’s the official standard and natively supported by Home Assistant. The old Owner API is a legacy system: commands are blocked on newer vehicles.
- What do I need? A Tesla Developer account (free) and a domain through which Home Assistant verifies your car. Sounds daunting, but the HA integration walks you through it step by step.
- What does it cost? Nothing in practice: Tesla gives you $10/month in free credit, which is easily enough for 1–2 of your own vehicles. Energy products (Powerwall, solar, Wall Connector) are even completely free.
- What can I automate? Battery level and charge power on the dashboard, excess solar charging, garage door on arrival, climate control, charge limit via automation.
- Teslamate works over the same Fleet API – running both in parallel is no problem.
Which API should I use?
| Owner API (legacy) | Fleet API (current) | |
|---|---|---|
| Status | Legacy, deprecated | Official standard, actively developed |
| Setup | Simple, but unofficial | A bit more effort (developer account + domain), HA guides you |
| Read data (battery, location) | Partially still possible | Full |
| Control (charging, climate, wake) | Blocked on newer vehicles | Full |
| Cost | Free | Free for 1–2 of your own cars ($10/month credit) |
| Recommendation | Don’t set up new | ✅ The right choice |
If you’re connecting your Tesla to Home Assistant today, use the Fleet API via the official HA integration tesla_fleet. The Owner API is a legacy system – starting fresh now saves you the migration later.
How to connect your Tesla to Home Assistant
The official Tesla Fleet integration does almost everything automatically. You only need three things prepared:
- Create a Tesla Developer account – register an app on developer.tesla.com (free, takes a few minutes). The HA integration explains exactly which fields to fill in during setup.
- A domain for verification – Home Assistant must prove that you own a web address. If you don’t have your own domain, services like FleetKey.net or HA’s NGINX SSL proxy add-on can help.
- Add the integration – in HA go to Settings → Devices & Services → Add Integration → Tesla Fleet. Log in with your Tesla account and HA sets up the connection.
The sensors then appear automatically: battery level, charge power, range, location, climate and much more – done, without typing a single command.
What you can automate
- Excess solar charging – only start charging when there’s enough solar surplus (see cross-references).
- Garage door and outdoor lights on arrival – location sensor + automation: when you enter the “Home” zone, the door opens.
- Set the charge limit dynamically – e.g. charge higher on weekends when PV power is available.
- Climate control – pre-cool the car when you leave for work (time- or location-based).
- Dashboard – battery level and range always in view, including history.
- Automatic notifications, e.g. by email, HA app push, NTFY, Alexa voice announcement etc., when your Tesla reaches a certain zone.
- As always, there’s almost nothing you can’t do.
Running TeslaMate and Home Assistant together
If you also use TeslaMate alongside Home Assistant (e.g. for drive statistics), the question is how the two systems should work together. There are two patterns – and one of them is clearly recommended.
The problem with independent parallel operation
When both the HA Tesla integration and TeslaMate each talk directly to the Tesla API:
- Higher energy consumption at idle: TeslaMate has sophisticated logic to detect when the vehicle wants to sleep and stops polling. If the HA integration keeps polling at the same time, it keeps the car awake or constantly wakes it up.
- Double API load: Both systems consume their own quota of API calls – with the Fleet API that counts against your monthly credit.
- Inconsistent values: Different polling intervals lead to time-shifted states between the two systems.
The best-practice approach: TeslaMate → MQTT → Home Assistant
The cleanest solution: TeslaMate is the only point of contact for the Tesla API and forwards the data to Home Assistant via MQTT.
flowchart LR
T["Tesla Vehicle"] <-->|Fleet API / Telemetry| TM[TeslaMate]
TM <-->|MQTT| MQ["Mosquitto Broker"]
MQ <-->|MQTT| HA["Home Assistant"]
How it works:
- TeslaMate exclusively handles communication with the Tesla API: token management, recording trips and charging sessions in the database, and gentle sleep management for the car.
- TeslaMate publishes all vehicle data (battery level, location, tire pressure, doors, …) in real time to your MQTT broker (e.g. the Mosquitto add-on in HA).
- Home Assistant reads the values via MQTT. Through the TeslaMate MQTT integration (e.g. via HACS ) all entities are created automatically – no manual YAML fiddling.
Advantages of this architecture:
- Exactly one API client: Only TeslaMate talks to Tesla – minimal API calls, no conflicts when the vehicle sleeps.
- Immediately up to date: State changes reach HA via MQTT without polling delay.
- Decoupled & stable: If something changes in the HA Tesla integration, your setup stays unchanged.
Sending commands from Home Assistant (climate, charging, charge limit)
Sending commands can also be solved cleanly:
- Option A (recommended): Pure MQTT. TeslaMate offers MQTT topics for commands (e.g. setting the charge limit). Home Assistant writes the command to that topic on the broker, TeslaMate reads it and executes it at Tesla. One API client, one configuration – the broker is the central hub for data and commands.
- Option B: HA integration for commands only. Keep the
tesla_fleetintegration installed in HA but reduce its polling heavily and use it only as a command sender. Simpler, but with double API presence.
The two patterns compared
| Independent (HA + TeslaMate direct) | Best practice (TeslaMate via MQTT) | |
|---|---|---|
| API calls | Double | Minimal (TeslaMate only) |
| Sleep behavior | Risky (mutual wake-ups) | Optimal (TeslaMate controls sleep) |
| Setup | 2× API/developer accounts | 1× TeslaMate + connect MQTT |
| Freshness | Depends on HA polling | Instant via MQTT push |
Frequently Asked Questions
Do I have to pay for the Fleet API? In practice, no. Tesla grants every developer account $10/month in free credit. Home Assistant polls every 10 minutes per awake vehicle and stays well within the credit. For safety, you can set a billing limit of $0 (or however much the usage is worth to you per month) in the Tesla developer dashboard – then nothing can be charged.
I already use Teslamate. Does it run in parallel? Yes. TeslaMate uses the same Fleet API and can use the same developer account. But to prevent the two systems from keeping the car awake, the clean architecture is worth it: TeslaMate as the single API interface, HA gets the data via MQTT – details in the section „Running TeslaMate and Home Assistant together“ .
I don’t have my own domain. Does it still work? Yes. Services like FleetKey.net or HA’s NGINX SSL proxy handle the verification for you – the HA integration shows you the way.
Why can’t I control my Tesla via the old API anymore? Tesla has deprecated the Owner API. On vehicles built since late 2023, remote commands are only accepted via the Fleet API (with key pair) – HA handles that for you.
Cross-References
- Excess solar charging with Tesla → Our Sungrow PV system
- Third-party integration for Tesla in HA → Tronity integration
- Official docs → Tesla Fleet API · HA Tesla Fleet integration · TeslaMate