-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
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 authorisation functionality to OpenSky Integration #91162
Conversation
Add username and password to allow more requests per day
Changed to require authentication as the API daily limit for non registered accounts had rendered the integration unusable
Removed a logging line. Added OPENSKY_URL
I'm new at this but this simple change is working well for me |
vol.Required(CONF_USERNAME): cv.string, | ||
vol.Required(CONF_PASSWORD): cv.string, |
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 no longer allow integrations to add or change a platform YAML configuration.
More information on this can be found in Architecture Decision Record:
Please note that this integration connects to a device or service and another Architecture Decision Record applies that disallows the use of YAML configuration in favor of a configuration flow via the UI:
See our developer documentation on how to get started creating a configuration flow for this integration:
https://developers.home-assistant.io/docs/config_entries_config_flow_handler
As these changes often involve a bit of work and some significant shift in the current code, we will close this PR for now.
We (and our community!) would really appreciate it if you could start on the refactoring of this integration in a new PR.
Thanks already! 👍
Yeah sorry @frenck i don’t think I have the technical skills to do the refactor….. |
Breaking change
Users of the integration must now supply a username and password. Currently anonymous users only get 400API calls per day which equates to one every 3.6 minutes which isn't useful when tracking aircraft. Registered users are allowed 4000 requests per day or one every 21.6 seconds. Therefore, the integration is only useful for registered users and thus there is now a requirement to supply credentials.
Proposed change
The integration currently makes an API call every 12 seconds which will result in the 400 API calls allowed being exhausted after 80 minutes. The integration will then crash when JSON is not returned. This fault has been the subject of numerous issues over the last few years. The most recent is here #45453
This PR adds the ability to enter a username and password into the config and then authorise the session.
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: