Skip to content

Add documentation for searching media for Sonos#45523

Draft
PeteRager wants to merge 2 commits into
home-assistant:nextfrom
PeteRager:sonos-search
Draft

Add documentation for searching media for Sonos#45523
PeteRager wants to merge 2 commits into
home-assistant:nextfrom
PeteRager:sonos-search

Conversation

@PeteRager
Copy link
Copy Markdown
Contributor

Proposed change

Add documentation and example for how to search media for Sonos

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

  • Link to parent pull request in the codebase: Add search to Sonos core#170891
  • Link to parent pull request in the Brands repository:
  • This PR fixes or closes issue: fixes #

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Copilot AI review requested due to automatic review settings May 22, 2026 17:41
@PeteRager PeteRager requested a review from jjlawren as a code owner May 22, 2026 17:41
@home-assistant home-assistant Bot added has-parent This PR has a parent PR in another repo next This PR goes into the next branch labels May 22, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 092e411
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/6a109534fa4609000879c096
😎 Deploy Preview https://deploy-preview-45523--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_media usage for Sonos local library search, including supported media_content_type values.
  • Add an automation/script example that captures response_variable results and plays items via media_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'] }}
@PeteRager PeteRager marked this pull request as draft May 22, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-parent This PR has a parent PR in another repo next This PR goes into the next branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants