Add documentation for searching media for Sonos#45523
Draft
PeteRager wants to merge 2 commits into
Draft
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds documentation to the Sonos integration page explaining how to search the local Sonos music library via media_player.search_media, including examples for queueing results and searching albums.
Changes:
- Document
media_player.search_mediausage for Sonos local library search, including supportedmedia_content_typevalues. - Add an automation/script example that captures
response_variableresults and plays items viamedia_player.play_media. - Add a short example for album searching.
Comment on lines
+335
to
+337
| ### Example: Search and add all matching tracks to the queue | ||
|
|
||
| This example searches for all tracks matching "love", clears the queue, adds the first 10 results to the queue, and then plays the queue: |
Comment on lines
+351
to
+352
| - repeat: | ||
| count: 10 |
| target: | ||
| entity_id: media_player.kitchen | ||
| - repeat: | ||
| count: 10 |
Comment on lines
+359
to
+365
| media: | ||
| media_content_id: >- | ||
| {{ results['media_player.kitchen']['result'][repeat.index - | ||
| 1]['media_content_id'] }} | ||
| media_content_type: >- | ||
| {{ results['media_player.kitchen']['result'][repeat.index - | ||
| 1]['media_content_type'] }} |
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.
Proposed change
Add documentation and example for how to search media for Sonos
Type of change
currentbranch).currentbranch).nextbranch).nextbranch).Additional information
Checklist
currentbranch.nextbranch.