{{ message }}
docs: add an example for re-announcing on interface changes#1803
Merged
Conversation
2 tasks
Contributor
|
|
bluetoothbot
suggested changes
Jun 22, 2026
bluetoothbot
left a comment
Contributor
There was a problem hiding this comment.
Blocking issues found.
- Example is built on deprecated get_all_addresses / get_all_addresses_v6
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1803 +/- ##
=======================================
Coverage 99.81% 99.81%
=======================================
Files 33 33
Lines 3750 3750
Branches 533 533
=======================================
Hits 3743 3743
Misses 5 5
Partials 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
All addressed in 71ffff3:
Verified the snapshot raises no DeprecationWarning under -W error. |
Contributor
Contributor
bluetoothbot
approved these changes
Jun 22, 2026
bluetoothbot
left a comment
Contributor
There was a problem hiding this comment.
No blocking issues found.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
Adds a runnable example showing how to re-announce services when the host's network interfaces change, using
async_update_interfaces()from #1797.zeroconf does not poll for interface changes itself; detection is platform specific and is best driven from whatever signal a host already has. When none is available, a small periodic poller is enough: snapshot the addresses and reconcile only when they change. The example also shows the part worth getting right, cancelling the monitor task before closing the instance.
This is the alternative to a built-in monitor (#1798, closed); the polling loop is small and belongs to the consumer, while the reconcile API does the hard part.
Test plan
examples/async_interface_monitor.pyimports and runs;pre-commit runclean (ruff, format, flake8, mypy)