Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for refresh_token to Tesla integration #55951

Closed
wants to merge 1 commit into from

Conversation

omelhus
Copy link

@omelhus omelhus commented Sep 8, 2021

Breaking change

Proposed change

Allow users to authenticate with Tesla using a refresh_token instead of username and password, as it's no longer possible to use username and password without captcha. Users are instructed to use the 'Auth App for Tesla' on iOS or 'Tesla Tokens' on Android in the config flow to generate a refresh_token.

teslajsonpy is updated to 0.20.0 to allow for authentication using refresh_token. (https://github.com/zabuldon/teslajsonpy/releases/tag/v0.20.0)

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@homeassistant
Copy link
Contributor

Hi @omelhus,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@probot-home-assistant
Copy link

Hey there @zabuldon, @alandtse, mind taking a look at this pull request as it has been labeled with an integration (tesla) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@alandtse
Copy link
Contributor

alandtse commented Sep 8, 2021

Thanks again for doing this. I just discussed with @balloob on discord and he thinks we should just take Tesla out of core if we're at the point we need to use third-party apps to login. I'll probably borrow your edits and move them into my custom component. We can point anyone to your custom component for now until the transition. I'll probably move my version into the custom_components repo. Would love for you to join me in maintaining it too.

@omelhus
Copy link
Author

omelhus commented Sep 9, 2021

Alright. It’s probably for the best, and I’m happy to help you maintain it.

@balloob
Copy link
Member

balloob commented Sep 9, 2021

Hope you are able to bundle forces. Having it out of core sets you free and you can update as often as is needed.

Let's hope Tesla comes around but I wouldn't hold my breath.

@balloob balloob closed this Sep 9, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tesla authentication fails
4 participants