-
-
Notifications
You must be signed in to change notification settings - Fork 31.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
Ensure remote bluetooth adapters are loaded before integrations that need them #85723
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…need them Integrations that provide a bluetooth adapter should add `bluetooth` as a dependency Integration that need to use a bluetooth adapter should add `bluetooth_adapters` as a dependency Integrations should now depend on the bluetooth_adapters integration which ensures all supported remote adapters have a chance to be connected before loading integrations that need them
8 tasks
5 tasks
bdraco
added a commit
to home-assistant/brands
that referenced
this pull request
Jan 12, 2023
11 tasks
bdraco
requested review from
Jc2k,
Ernst79,
Danielhiversen,
elupus and
rytilahti
as code owners
January 12, 2023 22:30
Ernst79
reviewed
Jan 12, 2023
No changes, only resolving conflicts |
balloob
reviewed
Jan 15, 2023
balloob
reviewed
Jan 15, 2023
balloob
approved these changes
Jan 15, 2023
thanks |
retest is good |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dev blog post and updates to the dev docs.
While its labeled as a breaking change, if the developer does nothing they will get the behavior before this PR where the remote bluetooth adapter may not be available before the integration is loaded which makes the impact minimal.
Breaking change
This breaking change is for developers only.
Before this change we could try to connect to a bluetooth device that was only reachable by a remote adapter before the remote adapter was setup. We need to wait until all the remote scanners have a chance to setup before trying to connect bluetooth devices to avoid connecting via the wrong adapter (one that will be very slow and slow down startup) or fail because the adapter that can see the device isn't connected yet.
Integrations that provide a bluetooth adapter should add
bluetooth
as a dependencyIntegration that need to use a bluetooth adapter should add
bluetooth_adapters
as a dependency which ensures all supported remote adapters have a chance to be connected before loading integrations that need themType 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: