Repository navigation
Add the audio receiver category - #554
Merged
Merged
Conversation
Add CATEGORY_AUDIO_RECEIVER = 34 per the HAP specification, a runnable AudioReceiver example accessory exercising the Speaker service, an xhm_uri test for the new category, and a docs entry for the example. Closes #444
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #554 +/- ##
=======================================
Coverage 92.22% 92.23%
=======================================
Files 40 40
Lines 7644 7645 +1
Branches 963 963
=======================================
+ Hits 7050 7051 +1
Misses 415 415
Partials 179 179
🚀 New features to boost your workflow:
|
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.
Closes #444
Adds the
AUDIO_RECEIVERaccessory category (34, per the HAP specification) so audio receivers get the proper tile/icon in the Home app.What's in it
pyhap/const.py:CATEGORY_AUDIO_RECEIVER = 34. As discussed in Any chance to support Category.AUDIO_RECEIVER ? #444, a category is purely a UI hint to iOS clients (it only appears in the BonjourciTXT record and the X-HM setup URI), so no further plumbing is required — the driver and setup payload already handle any category value.tests/test_accessory.py: anxhm_uritest case for the new category, covering the QR setup payload encoding.accessories/AudioReceiver.py: a runnable example accessory using the category with theSpeakerservice (mute + volume).docs/source/intro/examples.rst: lists the new example.Checks
dev).ruff check/ruff format --checkpass.ty checkshows no new findings vs. thedevbaseline.-W(zero warnings).🤖 This PR was prepared with AI assistance as part of the backlog triage of #444; the category value was verified against the HAP spec and an independent HomeKit implementation.