API to subscribe to multicast groups - #737
Open
puddly wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for zigpy’s new coordinator multicast group subscription APIs by wiring bellows’ multicast table controller into the ControllerApplication hooks, and updating tests/dependencies accordingly.
Changes:
- Implement
_subscribe_to_multicast_group()/_unsubscribe_from_multicast_group()inbellows.zigbee.application.ControllerApplication. - Add application-level tests covering subscribe/unsubscribe behavior with and without XNCP extensions.
- Update multicast table “missing entry” logging and bump the zigpy minimum version.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
bellows/zigbee/application.py |
Adds multicast subscribe/unsubscribe hook implementations that delegate to bellows.multicast.Multicast when enabled. |
bellows/multicast.py |
Lowers log severity when unsubscribing a group that is not in the multicast table. |
tests/test_application.py |
Adds tests for the new multicast group subscription APIs under different firmware feature sets. |
pyproject.toml |
Raises the minimum zigpy dependency version to pick up the new APIs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2689
to
+2691
| async def test_multicast_group_subscription(app: ControllerApplication) -> None: | ||
| """Test multicast group subscription APIs when there are no XNCP extensions.""" | ||
| app._ezsp._xncp_features = FirmwareFeatures.NONE |
Comment on lines
+2717
to
+2725
| async def test_multicast_group_subscription_xncp(app: ControllerApplication) -> None: | ||
| """Test multicast group subscription APIs when XNCP extensions are available.""" | ||
| app._ezsp._xncp_features |= FirmwareFeatures.MEMBER_OF_ALL_GROUPS | ||
|
|
||
| # Subscribe to a group (no-op) | ||
| await app.subscribe_to_multicast_group(0x1234) | ||
|
|
||
| # Unsubscribe from a group (no-op) | ||
| await app.unsubscribe_from_multicast_group(0x1234) |
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.
Implements zigpy/zigpy#1864. CI will fail until a new version of zigpy is released.