Video
/toc
Forget just checking stats — this integration lets you command your Tesla.
Start the climate, unlock the doors, change the charging rate — all without ever opening the Tesla app.
With the new official Tesla Fleet integration in Home Assistant, you can now control core vehicle functions directly from your dashboard, phone, or smartwatch. It goes far beyond basic monitoring — and yes, it’s secure and works with Tesla’s new Fleet API.
In this guide, I’ll walk you through every step to get this up and running — from generating encryption keys to creating widgets that can control your Tesla from your wrist.
📺 About This Video
Today, we’re diving into the brand new Tesla Fleet Integration for Home Assistant.
Tesla recently changed their API, which broke most community-built integrations. This new official integration uses the Tesla Fleet API and includes full authentication, encrypted communication, and support for a wide range of Tesla functions.
And the best part? All your existing automations can still work with just a few updates.
🧠 Sponsored Segment: Magic Mind
Before we jump in — quick shoutout to today’s sponsor: Magic Mind.
I’ve been using it for a few weeks now as part of my daily routine. It’s a productivity shot with matcha, nootropics, and adaptogens — and it’s perfect for staying focused during long editing days or coding sessions.
Try it out at magicmind.com/SMARTJUNE and use code SMARTJUNE for an exclusive discount.
⚙️ Prerequisites
Before diving into setup, make sure you meet the following requirements:
- ✅ Tesla Account with at least one vehicle or energy product
- 🏠 Home Assistant OS, version 2024.8 or newer
- 🌐 Secure HTTPS access using DuckDNS and NGINX SSL Proxy Add-on
- 🔐 Advanced SSH & Web Terminal Add-on enabled in Home Assistant
- 💳 Tesla provides $10/month free API credit, but you must add a credit card for overages
API calls (like unlocking or polling) consume credit, so be careful with automation frequency — we’ll talk about usage strategies later.
🔐 Step 1: Prepare Home Assistant
Generate Encryption Keys
Use Home Assistant’s terminal or SSH to generate your private and public keys:
openssl ecparam -name prime256v1 -genkey -noout -out tesla_fleet.key
openssl ec -in tesla_fleet.key -pubout -out public-key.pem
Move the keys into the proper locations:
cp tesla_fleet.key /config/tesla_fleet.key
mkdir -p /share/tesla/.well-known/appspecific/
cp public-key.pem /share/tesla/.well-known/appspecific/com.tesla.3p.public-key.pem
Configure NGINX
Create a custom config file:
echo 'location /.well-known/appspecific/com.tesla.3p.public-key.pem {
root /share/tesla;
}' > /share/nginx_proxy_default_tesla.conf
Update the NGINX SSL Proxy Add-on:
- Go to Settings → Add-ons → NGINX Home Assistant SSL proxy → Configuration
- Set customize.active to true
- Leave config.default as nginx_proxy_default*.conf
- Restart NGINX
Verify that your public key is accessible at:
https://yourdomain.com/.well-known/appspecific/com.tesla.3p.public-key.pem
👨💻 Step 2: Tesla Developer Account Setup
- Go to developer.tesla.com and create an account.
- Verify your email and enable MFA (optional).
- Visit developer.tesla.com/request to create a new app.
Application Fields:
- Application Name: e.g. “Home Assistant Integration”
- Purpose of Usage: “Home automation integration”
- OAuth Grant Type: Authorization Code and Machine-to-Machine
- Allowed Origin URL: https://yourdomain.com
- Redirect URI: https://my.home-assistant.io/redirect/oauth
Scopes to Select:
- Vehicle Information
- Vehicle Location
- Vehicle Commands
- Energy Product Information
- Energy Product Settings
Tesla gives you $10/month free credit for API usage. Most personal setups stay under this limit.
📡 Step 3: Register Your Domain with Tesla
Use a tool like curl (or Postman) to register your domain. First, request a token.
Token Request (M2M Client ID & Secret)
curl --request POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=**YOUR_CLIENT_ID**' \
--data-urlencode 'client_secret=**YOUR_CLIENT_SECRET**' \
--data-urlencode 'scope=**openid vehicle_device_data vehicle_cmds vehicle_location vehicle_charging_cmds**' \
--data-urlencode 'audience=**YOUR_REGION_URL**' \
'https://fleet-auth.prd.vn.cloud.tesla.com/oauth2/v3/token'
Replace the placeholders with your actual credentials and region:
- NA/APAC: https://fleet-api.prd.na.vn.cloud.tesla.com
- EMEA: https://fleet-api.prd.eu.vn.cloud.tesla.com
Copy the access_token from the output.
Register as Partner
curl --location 'YOUR_REGION_URL/api/1/partner_accounts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"domain": "yourdomain.com"
}'
If the response is valid, your domain is now trusted.
🧩 Step 4: Set Up the Integration in Home Assistant
- Go to Settings → Devices & Services → + Add Integration
- Search for Tesla Fleet
- Enter your Client ID and Client Secret
- Authenticate via Tesla’s login page and approve requested scopes
Once successful, you’ll see entities like:
- Lock/Unlock
- Climate controls
- Battery and charging status
- Location and more
If something fails, double-check:
- Public key is accessible
- Domain matches Tesla registration
- Scopes and redirect URI are correct
📱 Bonus: Build Smart Widgets & Watch Controls
🟦 iOS (iPhone / iPad)
- Open Home Assistant iOS App → App Configuration → Actions
- Add actions like:
- lock.lock
- climate.turn_on
- button.press
- Add a Home Assistant Widget from your home screen and assign the action
🟢 Android
- Long-press home screen → Add Widget
- Choose Home Assistant Action
- Assign your Tesla command
- Optionally customize the label/icon
⌚ Smartwatch (Wear OS & Apple Watch)
- Wear OS: Add tiles or shortcuts from Home Assistant
- Apple Watch: Actions created in iOS will appear automatically — assign them as complications for easy access
Pro Tip: Use stateless actions (like “Start AC”) for more reliable commands. You can also build automations using input_boolean toggles if you need more control or confirmation flows.
🏁 Conclusion
With this new Tesla Fleet integration, your smart home and smart car can finally work as one. Automate climate preconditioning before your commute, sync charging with solar output, or simply lock your car from your watch — no app required.
If this guide helped you, check out the full video walkthrough on the This Smart House YouTube channel and don’t forget to subscribe for more smart home tutorials!
👉 Video Sponsor: Magic Mind — Use code SMARTJUNE for a discount.