core
core copied to clipboard
Make DHCP discovery aware of the network integration
Proposed change
DHCP Discovery currently listens (watches) only on default interface. aiodhcpwatcher was updated and has now option to specify multiple interfaces by their index. Changes in this PR are simply handing over list of active interfaces during the call of aiodhcpwatcher.async_start.
Depends on #144769
/>David
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [x] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
Additional information
- This PR fixes or closes issue: fixes #144516
- This PR is related to issue: #144516
- Link to documentation pull request:
- Link to developer documentation pull request:
- Link to frontend pull request:
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [x] I have followed the development checklist
- [x] I have followed the perfect PR recommendations
- [x] The code has been formatted using Ruff (
ruff format homeassistant tests) - [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io
If the code communicates with devices, web services, or third-party tools:
- [x] The manifest file has all fields filled out correctly.
Updated and included derived files by running:python3 -m script.hassfest. - [x] New or updated dependencies have been added to
requirements_all.txt.
Updated by runningpython3 -m script.gen_requirements_all. - [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
To help with the load of incoming pull requests:
- [x] I have reviewed two other open pull requests in this repository.
Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration (dhcp) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of dhcp can trigger bot actions by commenting:
@home-assistant closeCloses the pull request.@home-assistant rename Awesome new titleRenames the pull request.@home-assistant reopenReopen the pull request.@home-assistant unassign dhcpRemoves the current integration label and assignees on the pull request, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.
Please do the library bump in a separate PR
Please do the library bump in a separate PR
Done. In #144769
What? Some checks later on wanted Optional[]... But ruff now want's to remove it?
Edit: Guess it was some typo from me then.
We need to change the string on the frontend side now
src/translations/en.json: "network_adapter_info": "Configure which network adapters integrations will use. Currently this setting only affects multicast traffic. A restart is required for these settings to apply.",
https://github.com/home-assistant/frontend/blob/ec3fdc0ea7e821ffd1f15515bb0e2ee8cae3e2e4/src/translations/en.json#L6422
Should be good to merge after we get a test and a linked PR on the frontend
Configure which network adapters integrations will use. Currently this setting only affects multicast traffic and DHCP discovery. A restart
Does that sounds right?
I think we can drop the sentence Currently this setting only affects multicast traffic as all the core discovery integrations listed on that page will now use network after this.
Ah, I see. Okay then!
https://github.com/home-assistant/frontend/pull/25452
There is some garbage again.. Can you run the test number 7 again?
Retested on production. Everything still works
Nice! Thank you. 🎉