Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor/hap-status-error #561 +/- ##
==========================================================
Coverage 92.05% 92.06%
==========================================================
Files 54 54
Lines 10914 10920 +6
Branches 1407 1407
==========================================================
+ Hits 10047 10053 +6
Misses 579 579
Partials 288 288
🚀 New features to boost your workflow:
|
ikalchev
force-pushed
the
refactor/hap-status-error
branch
from
November 13, 2026 13:02
ddf1d1d to
059c3f8
Compare
ikalchev
force-pushed
the
refactor/getter-error-isolation
branch
from
November 13, 2026 13:02
f26ddb6 to
e1c8991
Compare
This was referenced Nov 13, 2026
A getter that raises HapStatusError answers a read of its characteristic with that status instead of -70402, like a setter does. A failing getter no longer fails the whole /accessories response: its characteristic is listed without its value, and the rest of the accessory database is served as usual. Until now a raising getter failed the entire request, so one broken accessory could break pairing for every accessory behind the bridge. Add accessories/busy_lock.py as an example of the error protocol: a lock that refuses commands with RESOURCE_BUSY while its bolt is moving, and an offline sensor whose reads answer with a status instead of a value.
ikalchev
force-pushed
the
refactor/getter-error-isolation
branch
from
November 13, 2026 14:41
e1c8991 to
e64d6e5
Compare
ikalchev
force-pushed
the
refactor/hap-status-error
branch
from
November 13, 2026 14:41
059c3f8 to
df8cde0
Compare
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.
Stacked on #560 (APIs: #562). Two parts:
1. Getters answer with a status, isolated per characteristic
HapStatusErroranswers a read of its characteristic with that status instead of-70402— the read-side twin of Add HapStatusError and answer setter failures with its status #560./accessoriesresponse: its characteristic is listed without its value, and the rest of the accessory database is served as usual. Until now a raising getter failed the entire request, so one broken accessory could break pairing for every accessory behind the bridge.2. Example accessory:
accessories/busy_lock.pyDemonstrates the error protocol end to end, as a bridge:
RESOURCE_BUSY, and the refused target is put back so the accessory keeps a consistent state. The Home app shows the command as failed instead of pretending it worked.SERVICE_COMMUNICATION_FAILUREinstead of a value that would be a lie.Listed in
intro/examples.rst; verified with a smoke test against the real driver (set_characteristics/get_characteristics/get_accessories).Tests
New tests cover: sync and async setter refusals (standalone and bridged), service and accessory level refusals, getter status answers, and
/accessoriesisolation of a failing getter. Stack tip: 1729 tests pass, ruff clean,tyat the pre-existing baseline categories, docs build-Wclean.