TESLA integration broken after update to core-2025.1.2
The problem
Settings show the following message: "Home Assistant Core Integration Authentication expired for bxxxxxxxxxxxxxxxxx8"
When clicked, TESLA (https://auth.tesla.com/) responds with this message: "Error has occurred We don't recognize this redirect_uri. Please use the redirect_uri found in your app details. Reference ID: abcdefgkdjfhlasdkjfasdkl;fjasdfkljasd;f copy https://developer.tesla.com/docs/fleet-api#help-and-support"
What version of Home Assistant Core has the issue?
2025.1.2
What was the last working version of Home Assistant Core?
2025.1.1
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Tesla Fleet
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @bre77, mind taking a look at this issue as it has been labeled with an integration (tesla_fleet) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of tesla_fleet can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign tesla_fleetRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
tesla_fleet documentation tesla_fleet source (message by IssueLinks)
Is your redirect URl set to https://my.home-assistant.io/redirect/oauth on the Tesla Developer portal?
Per the page for https://my.home-assistant.io/redirect/oauth at https://www.home-assistant.io/integrations/my/ is this my: in your configuration.yaml anywhere? Adding that fixed my errors with the Tesla website trying to redirect to my local Home Assistant URL.
@tmason818 Where did you enter the URL? Under this: http: cors_allowed_origins:
Under Allowed Origin URL(s), enter your domain where you hosted your public key earlier. Using the example above, this would be https://my.domain.com/.
What does that even mean?
Getting the same error too. I was on 2024.12 oh Home Assistant, just updated to 2025.1.2 and this integration broke. Error message was something along the lines of the token has expired. I've delete the integration to set it up again, and now getting the error, a condition has not been met to process this request. Have also recreated the application in developer.tesla.com.
Edit: I have just downgrade back to 2024.12.4 and have been able to re link successfully. The app i created following the documentation still doesn't work. But when you click on add, you get the option to setup with "open source client ID" and it takes your through a process of linking it to your account. I did not get / see this in 2025.1.2
I had full functionality before updating HA, and now, after reconfiguring everything (it has been a headache) I see that the effort has been for nothing. I'll stay here in case there is any news.
Under Allowed Origin URL(s), enter your domain where you hosted your public key earlier. Using the example above, this would be https://my.domain.com/.
What does that even mean?
Tesla changed their business model for their Fleet API and in order to use it on its own or with things like Home Assistant you'll need to host a public key for them to access on the public internet. It will need to be hosted on a website at a domain you are the registrant for that is accessible at https:// or more specifically https://[your.domain.com]/.well-known/appspecific/com.tesla.3p.public-key.pem.
I had full functionality before updating HA, and now, after reconfiguring everything (it has been a headache) I see that the effort has been for nothing. I'll stay here in case there is any news.
As mentioned- Tesla changed their business model regarding the Fleet API so even if you did not upgrade HA Tesla is going stop providing data to the Tesla Fleet integration on February 1st regardless.
This other thread is sort of a "master" thread that should help you stay up to date and/or assist with setting up the methodology that Tesla now requires.
Under Allowed Origin URL(s), enter your domain where you hosted your public key earlier. Using the example above, this would be https://my.domain.com/.
What does that even mean?
Tesla changed their business model for their Fleet API and in order to use it on its own or with things like Home Assistant you'll need to host a public key for them to access on the public internet. It will need to be hosted on a website at a domain you are the registrant for that is accessible at https:// or more specifically https://[your.domain.com]/.well-known/appspecific/com.tesla.3p.public-key.pem.
I had full functionality before updating HA, and now, after reconfiguring everything (it has been a headache) I see that the effort has been for nothing. I'll stay here in case there is any news.
As mentioned- Tesla changed their business model regarding the Fleet API so even if you did not upgrade HA Tesla is going stop providing data to the Tesla Fleet integration on February 1st regardless.
This other thread is sort of a "master" thread that should help you stay up to date and/or assist with setting up the methodology that Tesla now requires.
i dont understand the key part. I host a key, ok. But how and where is it used? Does tesla only check if there is a key and thats it?
i dont understand the key part. I host a key, ok. But how and where is it used? Does tesla only check if there is a key and thats it?
It doesn't matter if you generate the public key and host it on a tesla-recognised host (I used Cloudfare by git-ing a GitHub repository) and, in general, perform all the necessary steps. I have done this and the integration does not work.
Under Allowed Origin URL(s), enter your domain where you hosted your public key earlier. Using the example above, this would be https://my.domain.com/.
What does that even mean?
Tesla changed their business model for their Fleet API and in order to use it on its own or with things like Home Assistant you'll need to host a public key for them to access on the public internet. It will need to be hosted on a website at a domain you are the registrant for that is accessible at https:// or more specifically https://[your.domain.com]/.well-known/appspecific/com.tesla.3p.public-key.pem.
I had full functionality before updating HA, and now, after reconfiguring everything (it has been a headache) I see that the effort has been for nothing. I'll stay here in case there is any news.
As mentioned- Tesla changed their business model regarding the Fleet API so even if you did not upgrade HA Tesla is going stop providing data to the Tesla Fleet integration on February 1st regardless. This other thread is sort of a "master" thread that should help you stay up to date and/or assist with setting up the methodology that Tesla now requires.
i dont understand the key part. I host a key, ok. But how and where is it used? Does tesla only check if there is a key and thats it?
ahhh i see, there is a new documentation. The integration expects your private key to be located at config/tesla_fleet.key.
@Bre77 the documentation about putting the private key into the homeassistant directory... it is better if we move it after or in the "Hosting a Public/Private Key Pair" part.
i dont understand the key part. I host a key, ok. But how and where is it used? Does tesla only check if there is a key and thats it?
It doesn't matter if you generate the public key and host it on a tesla-recognised host (I used Cloudfare by git-ing a GitHub repository) and, in general, perform all the necessary steps. I have done this and the integration does not work.
mine is working now. What you need to do:
- Host public key on a domain with working https.
- copy your private key to the config folder
- setup the developer account, add your domain to the key and the oauth domain.
- Register your application as a fleet api partner (run curl commands)
- configure (link) your homeassistant tesla integration
- optional: if your tesla is late 2023 or older you need to command signing in the tesla app. i didnt do that.
based on this information the documentation needs restructuring!
mine is working now. What you need to do:
- Host public key on a domain with working https.
- copy your private key to the config folder
- setup the developer account, add your domain to the key and the oauth domain.
- Register your application as a fleet api partner (run curl commands)
- configure (link) your homeassistant tesla integration
- optional: if your tesla is late 2023 or older you need to command signing in the tesla app. i didnt do that.
based on this information the documentation needs restructuring!
What do you mean by:
2- copy your private key to the config folder?
I haven’t seen that step in the documentation, which config folder are you referring to?I have done the rest of the steps correctly, maybe if I also do number 2 it will work, but I need a little more detail
So could we host the public key in HA itself if it's accessible remotely (via DDNS, Nabu Casa, etc.)?
So could we host the public key in HA itself if it's accessible remotely (via DDNS, Nabu Casa, etc.)?
yes, but then you have to tell tesla your dns for your smarthome and make something accessible there. i rather use a small webhost or virtual server for that.
mine is working now. What you need to do:
- Host public key on a domain with working https.
- copy your private key to the config folder
- setup the developer account, add your domain to the key and the oauth domain.
- Register your application as a fleet api partner (run curl commands)
- configure (link) your homeassistant tesla integration
- optional: if your tesla is late 2023 or older you need to command signing in the tesla app. i didnt do that.
based on this information the documentation needs restructuring!
What do you mean by:
2- copy your private key to the config folder?
I haven’t seen that step in the documentation, which config folder are you referring to?I have done the rest of the steps correctly, maybe if I also do number 2 it will work, but I need a little more detail
i was wondering the same some time. not sure if the documentation changed while we had the problem. but its in there if u scroll some more.
I am using nabu casa and my home assistant is located at: https://XXXX.ui.nabu.casa/ How can I host a the public key file using nabu casa ? As far as I know, I don't have access to public root of the sub domain. Can someone help ? @Bre77
I am using nabu casa and my home assistant is located at: https://XXXX.ui.nabu.casa/ How can I host a the public key file using nabu casa ? As far as I know, I don't have access to public root of the sub domain. Can someone help ? @Bre77
You can't.
e Tesla Developer portal?
May be this is an issue
I am using nabu casa and my home assistant is located at: https://XXXX.ui.nabu.casa/ How can I host a the public key file using nabu casa ? As far as I know, I don't have access to public root of the sub domain. Can someone help ? @Bre77
You can't.
What is possible with NabuCasa then? It worked for me without A [Developer Application] has been added as 3rd party one..
Hi,
Still don't know what is a preferred solution.. Is don't remember that I setup Developer API but used it with 3rd party asaps line Testify or Tessie get the data.
Registered one on https://developer.tesla.com/ if it works..
Used https://____.ui.nabu.casa for approved sources
Used https://____.ui.nabu.casa/redirect/oauth for routing one
Doesn't work..
Error has occurred We don't recognize this redirect_uri. Please use the redirect_uri found in your app details. Reference ID: dd1fbcbccd9d4ea997144fae4598d5cc-1737644242529 copy https://developer.tesla.com/docs/fleet-api#help-and-support
Any tips?
BR,
Zoltan
Used https://____.ui.nabu.casa/redirect/oauth for routing one
@Siminhu74 According to the configuration setup documentation the "Allowed Redirect URI(s)" field needs to literally be filled in with https://my.home-assistant.io/redirect/oauth i.e. you would not swap out the my.home-assistant.io for your nabu.casa domain. I got tripped up by that detail because the instructions have to use variables like my.domain but my.homeassistant.io is not a variable in this case.
Make sure you have this default integration configured correctly so redirects will correctly go to Home Assistant- mine was not set up by default (or I messed it up over the years who knows). You can view my post in this other thread for more background info.
Used https://____.ui.nabu.casa/redirect/oauth for routing one
@Siminhu74 According to the configuration setup documentation the "allowed Origin URI(s)" needs to literally be
https://my.home-assistant.io/redirect/oauth
You mean the redirect URL, the origin has to be something else you own with an SSL cert and hosting your public key.
You mean the redirect URL, the origin has to be something else you own with an SSL cert and hosting your public key.
Whoops- yes had them backwards. I've edited my original post to prevent confusion.
I followed the many advices of the official integration documentation and @[email protected] https://www.wswapps.com/books/home-assistant/page/tesla-fleet-setup
I successfully worked through until the final step to configure the integration with my AppName, ClientID, ClientSecret.......
I am ending up with We don't recognize this redirect_uri. Please use the redirect_uri found in your app details.
I am 100% sure I used https://my.home-assistant.io/redirect/oauth and have "my:" in my configuration.yaml
May the error be with the fact that my home assistant is not accessible by open internet - so https://my.home-assistant.io/ leads to a local URL http://ha.fritz.box:8123?
If so: any remediation?
PS: home assisatnt is locally hosted (not nabu.casa)
I found this video on YouTube
Instalar Tesla Fleet en Home Assistant paso a paso
https://youtu.be/AhtY69hpSNU
I followed the instructions and it worked.
@matejek Make sure that these two fields in the Tesla Developer App Settings aren't reversed. It could be that.
@JaggedJax how stupid one can be! I am!! I in deed mixed the rows.
that "final" step worked like a charm after I corrected the entries...... now, I am getting an error telling me "no devices or entities"
@matejek did you call the register API endpoints for your region? That is what that error typically means.
Hi all, I am definately stuck at the "no devices or entities". I archived the Tesla-Development-Apps, created a new one, assigned the correct URLs
assigned the right areas (I removed energy)
assinged EU server and adjusted scope in postman
received positive TeslaPartnerAccount
in home assistant I removed TeslaFleet instance and oAuth, added TeslaFleet again
linked HA to Tesla successfully
but still no success
I am lost, again