Skip to content

Fix tests for zigpy's Green Power endpoint and broadcast - #293

Merged
puddly merged 1 commit into
devfrom
zigpy-bot/fix-gp-broadcast-test-server
Nov 15, 2026
Merged

puddly merged 1 commit into
devfrom
zigpy-bot/fix-gp-broadcast-test-server

Conversation

@zigpy-review-bot

Copy link
Copy Markdown
Collaborator

Summary

CI is red on dev and on every open PR (for example #292): 137 tests under tests/application fail. zigpy 2.4 registers the Green Power endpoint (242) on the coordinator and sends a Green Power broadcast (AF.DataRequestExt to 0xFFFD, endpoint 242, cluster 0x0021) on startup and when permitting joins. The test Z-Stack server had no handler for it, so the request failed with CommandNotRecognized.

Requested in #292 (comment).

Changes

  • tests/conftest.py: the test server acknowledges AF.DataRequestExt to the Green Power endpoint and cluster with SUCCESS.
  • tests/application/test_startup.py: test_endpoints expects the third registered endpoint (242).
  • tests/application/test_joining.py: the permit-join broadcast now has TSN 4, since the Green Power broadcast takes TSN 3.

No library code changes.

Testing

Full suite in a clean venv with zigpy 2.4.1: 396 passed (before: 137 failures on dev). pre-commit passes.

zigpy 2.4 registers the Green Power endpoint (242) on the coordinator and
sends a Green Power broadcast on startup and when permitting joins. The test
Z-Stack server had no handler for that broadcast, which failed ~137 application
tests with `CommandNotRecognized`.
@zigpy-review-bot zigpy-review-bot added code quality Improvement to code quality bot-watch: fix zigpy-review-bot follows this thread and also pushes fixes (review + fix) labels Nov 15, 2026
@codecov

codecov Bot commented Nov 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.57%. Comparing base (926626c) to head (39895f4).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #293      +/-   ##
==========================================
+ Coverage   98.54%   98.57%   +0.02%     
==========================================
  Files          43       43              
  Lines        3582     3582              
==========================================
+ Hits         3530     3531       +1     
+ Misses         52       51       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@puddly
puddly merged commit c91e7a5 into dev Nov 15, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-watch: fix zigpy-review-bot follows this thread and also pushes fixes (review + fix) code quality Improvement to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants