Confirmed by direct hardware check: a334c8ba...=Bedroom, d0166d6f...=
Living Room -- the swap from two commits ago was right, my revert of
it was wrong.
The actual bug behind the last "Living Room played in Bedroom" report
was that the wait loop before play_media only checked supported_features
(is play_media possible at all), not whether select_source's target had
actually taken effect -- so if some other device was already active
from earlier testing, the feature-gate could pass immediately while
Spotify was still routing to that old device. Now the loop also waits
for the source attribute to match the requested room's ID before
proceeding.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The prior swap (a334...=Bedroom, d0166...=Living Room) was based on a
misdiagnosis: pre-fix, the cold-start race meant play_media could fire
before select_source's device transfer had actually completed, so
playback landed on whatever device was already active rather than the
requested room -- that looked like "backwards IDs" but wasn't. Now
that the race is fixed, select_source reliably lands wherever it's
told, which is exactly what exposed the swap as wrong: a live test
asking for Living Room played in the Bedroom. Reverting to the
original mapping (a334...=Living Room, d0166...=Bedroom).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
queue_music's tool description explains at length that playlists/
albums/artists auto-play instead of queueing, and the small model was
using that as a signal to route ANY playlist/genre request through
queue_music -- even ones that said "play". Verified: "play jazz in
the bedroom" called queue_music 0/5 reps before this change (and in
the opaque-ID room variant), 5/5 play_music after, with no
regressions across the rest of the suite (199/200, 39/40 reliable).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The Spotify integration only exposes the media_player.play_media
service once it has an active playback context, which doesn't exist
yet on a cold start; the fixed 2s delay after select_source wasn't
long enough in that case even though it always worked once something
had already played. Poll supported_features for the PLAY_MEDIA bit
(up to 8s) before calling play_media instead of guessing a fixed delay.
Also swap the Living Room/Bedroom source_list ID mapping in both the
prompt (for display) and the functions (for select_source) -- it was
backwards.
Adds a test-harness regression case exercising the opaque Spotify
Connect device IDs the source_list actually reports.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Renders the Extended OpenAI Conversation prompt/function definitions and
checks the model's first tool-call choice against test phrases, bypassing
Home Assistant.
Add automated validation workflows for HACS and Hassfest to ensure repository meets quality standards for HACS default store inclusion.
Workflows run on:
- Every push and pull request
- Daily at midnight UTC
- Manual trigger via Actions tab
Validates:
- HACS repository structure and metadata
- Home Assistant integration standards
Major documentation updates:
- Streamline README by removing redundant sections
- Link to example files instead of duplicating configuration
- Fix typos and update model recommendations
- Add GPU acceleration documentation link
- Remove outdated "Prompt Optimization" section
Test suite improvements:
- Add comprehensive queue management tests (5 new tests)
- Add shuffle control tests (3 new tests)
- Fix combined query references to match current system prompt
- Update total test count to 53
- Renumber all test sections for consistency
- TODO refresh
- Playlist searches now automatically check personal playlists before public ones
- Remove 'playlist' and 'playlists' from search queries for better matching
- Eliminate user_playlist type - just use playlist for all playlist searches
- Update all documentation and examples to reflect new behavior
- Add podcast support as future feature to TODO.md
Features:
- Exact matching for all search types (artists, albums, tracks, playlists)
- User playlist search (type=user_playlist) with exact and partial matching
- Performance caching for user playlist data
- Comprehensive documentation and test cases
- HACS integration support (hacs.json)
All search types now use limit=10 and prefer exact name matches to avoid
Spotify's personalized recommendations, ensuring you get what you ask for.
- Clarify that integration provides search, but LLM determines accuracy/speed
- Recommend qwen3:4b as good starting point for local voice pipelines
- Link to Performance section for optimization guidance
- Add shuffle_on and shuffle_off actions to control_playback function
- Update prompt to automatically enable shuffle when playing artists
- Add artist radio mode feature to README
- Update all example configurations with shuffle support
- Simplify control_playback YAML syntax (if/then vs choose/conditions)
- Add shuffle examples to voice command demonstrations
- Add 'Why Natural Language Matters' section comparing intent patterns vs LLM
- Show both standard patterns (that work everywhere) and conversational examples (LLM advantage)
- Add explicit default speaker configuration in system prompt
- Include note about when default speaker is used
- Demonstrate conversational playback control examples
- Replace symlink instructions with Docker bind mount setup (primary method)
- Add clear guidance on when to restart vs reload integration
- Document that Python changes require full restart, YAML only needs reload
- Add comprehensive troubleshooting section for common issues
- Include performance notes about 15-50x caching improvement
- Add code quality standards and pre-commit checks
- Clarify symlink limitations in Docker environments
Makes all prerequisites clear upfront:
- Spotify Premium account
- HA Spotify integration (OAuth)
- Extended OpenAI Conversation or similar LLM agent
- At least one Spotify Connect device
Helps users quickly determine if this integration is right for them.
- Explain that Music Assistant and this integration work together
- MA is excellent for UI control, this is for custom voice assistants
- Music started via voice appears in MA interface
- They complement each other, don't conflict
Voice-controlled Spotify playback integration for Home Assistant
Features:
- Natural language music control via Extended OpenAI Conversation
- Exact match artist search (finds Coldplay when you ask for Coldplay)
- Support for artist, album, track, and playlist searches
- Smart caching for 15-50x performance improvement
- Works with any Spotify Connect device
- Zero additional authentication (reuses HA Spotify OAuth)
- Enterprise-grade code quality with defensive programming
Technical improvements:
- Client caching with automatic validation
- Input validation and error handling
- Defensive attribute checks
- Lazy logging for performance
- Clear error messages for users