Repository navigation
Add a Home Assistant pairing toggle to Audio output cards - #321
Merged
Merged
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Required rpi3 validation with HA 2026.11 and MA 2.11 dev remains outstanding for end-to-end pairing and client_id updates after switching outputs and reconnecting HA.
No open issues 🎉
What changed in this PR
Adds the Audio-tab UI for #229, building on #320’s backend so users can choose one output for Home Assistant pairing with Music Assistant.
Changes:
- Adds a pairing toggle to every output card without exposing the token through the toggle.
- Loads the persisted selection at mount, follows broadcast updates, and displays failures.
- Adds LiveView tests for selection, switching, clearing, persistence, broadcasts, errors, and invalid IDs.
| File | Description |
|---|---|
test/universal_proxy_web/live/audio_live_test.exs |
Adds facade stubs and tests for pairing-toggle behavior. |
lib/universal_proxy_web/live/audio_live.ex |
Adds pairing controls, selection state, broadcast handling, and error feedback. |
Review effort: Balanced
bbangert
force-pushed
the
feat/ha-sendspin-auto-pair-ui
branch
from
November 10, 2026 01:39
f2d8912 to
c9a39de
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Required rpi3 validation with HA 2026.11 and MA 2.11 dev remains outstanding because LiveView tests do not establish end-to-end pairing or HA client_id refresh after switching outputs and reconnecting.
No open issues 🎉
Review effort: Balanced
bbangert
force-pushed
the
feat/ha-sendspin-auto-pair-ui
branch
from
November 10, 2026 02:00
c9a39de to
5e2334c
Compare
Each output card gets a "Pair through Home Assistant" toggle that selects (or clears) the one output reported to HA, following the selection broadcast so every open page agrees. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bbangert
force-pushed
the
feat/ha-sendspin-auto-pair-ui
branch
from
November 10, 2026 02:23
5e2334c to
37c9875
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.
Summary
UI half of #229. Each output card on the Audio tab gets a "Pair through Home Assistant" toggle, in the same style as the CEC toggle rows. It selects the one output whose Sendspin client is reported to Home Assistant (backend in #320).
{:home_assistant_pairing, key}broadcasts onHomeAssistantPairing.topic/0, so every open page shows the same selection. The selection is read at mount, so a persisted one shows after a reload.dynamic_pin.Design decisions
DISABLEDuntil the output is turned on.:audio_facadetest seam (Audio.home_assistant_pairing/0,select_home_assistant_pairing/1,clear_home_assistant_pairing/0).Testing
mise run test: 3815 passed (8 doctests, 3807 tests), 3 excludedmix dialyzer(host, dev): passedmix format --check-formatted: cleanHW validation still required on the rpi3 against HA 2026.11 + MA 2.11 dev (the issue's "Done when" boxes):
client_idafter it reconnectsRefs #229
🤖 Generated with Claude Code