-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
Point add redirect uri #101967
Point add redirect uri #101967
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We require a 100% test coverage on our configuration flows; it seems like this PR doesn't provided that.
Could you take a look?
Thanks 👍
../Frenck
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
1d23a30
to
6264b0a
Compare
Yes, I just saw that I didn't reach full coverage, my latest commit fixes that. |
@frenck we do have 100% coverage on config_flow now. |
"""Return current schema.""" | ||
return vol.Schema( | ||
{ | ||
vol.Required(CONF_REDIRECT_URI): str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, why doesn't this implement an OAuth flow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but not using home-assistant's oauth.
I've been trying to implement using the guidelines but I don't quite understand all parts and have not found an integration that does it by the book either.
The userbase for Point is quite small, perhaps it is better to pull this integration and use hacs instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been trying to implement using the guidelines but I don't quite understand all parts and have not found an integration that does it by the book either.
There are many integrations doing oauth flows? They all use the same constructs.
The thing is, the redirect URL should not even be a question... With the default flows, it will handle that for the user.
perhaps it is better to pull this integration and use hacs instead.
I do not understand what the latter reasoning has to do with anything? Even as a HACS integration, one should be using the right constructs, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are many integrations doing oauth flows? They all use the same constructs.
Could you please name a few for reference.
perhaps it is better to pull this integration and use hacs instead.
I do not understand what the latter reasoning has to do with anything? Even as a HACS integration, one should be using the right constructs, right?
The reasoning is that I don't feel I have the time to keep up with the high code quality standards. I did another PR #100843 but that was rejected due to 1. I updated the yaml 2. Once I've rewritten the flow to not use yaml the pr should be split up, this is the first stage of the split.
I feel that I've already spent too much time on this, implementing "the right" oauth flow will take me another 6-8 hours which I don't have atm. Either accept this pr (with guidelines on how to make it appropriate) or pull support for Point (the integration is currently broken as Minut have change the oauth flow).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please name a few for reference.
Search for AbstractOAuth2FlowHandler
usage in config_flow.py files across our codebase, we currently have 26 integrations implementing it.
Some ones that have been implemented fairly recently (and thus had recent reviews) are Twitch, Fitbit and YouTube.
The reasoning is that I don't feel I have the time to keep up with the high code quality standards.
This has nothing to do with coding standards. 🤷
Either accept this pr (with guidelines on how to make it appropriate) or pull support for Point (the integration is currently broken as Minut have change the oauth flow).
I really want to help, but let me be very clear: These kinds of statements don't help and are not a factor in merging PRs. If anything, they make me not wanting to help out and I don't see how this would be fruitful in any way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking upstream at the minute point docs, they implement a really standard OAuth2 flow, which we fully support out of the box. The amount of code used by this integration can be reduced quite a bit and simplified.
Should not take more than 1-2 hours to fix/adjust I think (including import of existing configuration).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking upstream at the minute point docs, they implement a really standard OAuth2 flow, which we fully support out of the box. The amount of code used by this integration can be reduced quite a bit and simplified.
Should not take more than 1-2 hours to fix/adjust I think (including import of existing configuration).
Sounds great, I'll have a look at it!
Hi! I've been testing this new version to see if it can work with my account. This version got me a lot further into the setup. However, entities won't show up after the configuration is done. There is a lot of this unhelpful error:
But when I reload the integration, I do get this slightly more helpful error:
Happy to test any updates or try to help in any way I can. |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Proposed change
Update configflow to allow redirect_uri input as required by the Minut API.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: