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

refresh_token used in config_flow.py #1

Open
robertteir opened this issue Apr 14, 2024 · 3 comments
Open

refresh_token used in config_flow.py #1

robertteir opened this issue Apr 14, 2024 · 3 comments
Assignees

Comments

@robertteir
Copy link

Hi,

First off awesome work and thank you!

I think the refresh_token is used in the test in config_flow.py, so it is already used and then the integration fails.

I was able to make it work by manually setting a new refresh_token in core.config_entries and then reloading HA.

@selleronom
Copy link
Owner

Thank you!

I am testing the approach of using refresh_tokens instead of the previous username / password login flow after MittFortum changed their login method. I will work on cleaning up the code for using refresh_token after a week of testing ;)

@selleronom selleronom self-assigned this Apr 16, 2024
@Jerra94
Copy link

Jerra94 commented Jun 1, 2024

Hi,
I'm trying to add this integration but I having issues configuring it.
How do I obtain the refresh token?
How do I configure this integration, is the only way via the file /config/custom_components/mittfortum/strings.json?

selleronom added a commit that referenced this issue Jun 2, 2024
@selleronom
Copy link
Owner

@Jerra94 You can find your refresh_token by using a browser:

  1. Open 'Networks' tab in 'Web developer tools'
  2. Login to MittFortum
  3. Search for 'access_token'
  4. Check the 'Response'
  5. Copy 'refresh_token'
  6. Use 'refresh_token' as the 'username' for the integration

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants