Skip to content

Restore children with rx_on_when_idle=0 - #17

Merged
puddly merged 1 commit into
devfrom
puddly/restore-children-rx-on-when-idle
Nov 12, 2026
Merged

puddly merged 1 commit into
devfrom
puddly/restore-children-rx-on-when-idle

Conversation

@puddly

@puddly puddly commented Nov 12, 2026

Copy link
Copy Markdown
Member

Fixes #15.

This is a simple typo but it does expose a gap in the API: there (rarely) can be children with rx_on_when_idle=True and these would be incorrectly restored. We should expand the wire API to allow both fields to be set.

Copilot AI balanced review requested due to automatic review settings November 12, 2026 18:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified in the change restoring sleepy-device behavior for restored children.

No open issues 🎉

What changed in this PR

Fixes #15 by restoring children with rx_on_when_idle=0, so sleepy end devices can continue receiving commands after migration or restart.

Changes:

  • Defaults restored children to sleepy-device behavior when backups lack capability information.
  • Adds a regression assertion for the restored rx_on_when_idle value.
File Description
zigpy_ziggurat/​zigbee/​application.py Sets rx_on_when_idle to 0 when restoring children.
tests/​test_application.py Verifies restored children have rx_on_when_idle=0.

Review effort: Balanced

@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2f2beb3) to head (b3917f9).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev       #17   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines         1213      1213           
=========================================
  Hits          1213      1213           

☔ 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.

@zigpy-review-bot zigpy-review-bot added the bugfix This PR fixes a bug label Nov 12, 2026
@puddly
puddly merged commit a90cb80 into dev Nov 12, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This PR fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sleepy end devices are restored with rx_on_when_idle=True

3 participants