Skip to content

Add description for new favorite button in Music Assistant #39703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 25, 2025

Conversation

marcelveldt
Copy link
Member

@marcelveldt marcelveldt commented Jun 25, 2025

Add a description for the new button entity that was added to the Music Assistant integration to add the currently playing song to your favorites.

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

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.

Summary by CodeRabbit

  • Documentation
    • Updated Music Assistant integration documentation to include support for the Button platform.
    • Added details about a new "Favorite current song" button, allowing users to add the currently playing song to favorites for each player.

@Copilot Copilot AI review requested due to automatic review settings June 25, 2025 07:09
@home-assistant home-assistant bot added has-parent This PR has a parent PR in a other repo next This PR goes into the next branch labels Jun 25, 2025
Copy link

netlify bot commented Jun 25, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 90cda07
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/685ba606d21fba00089ed005
😎 Deploy Preview https://deploy-preview-39703--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link
Contributor

@Copilot 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

This PR adds documentation for the newly introduced favorite current song button in the Music Assistant integration. The changes include updating the integration platforms list and adding a detailed description of how the button works, including its behavior when no playable content is available.

Comments suppressed due to low confidence (1)

source/_integrations/music_assistant.markdown:54

  • [nitpick] To align with the Oxford comma usage in the style guidelines, add a comma after 'AirPlay'.
The Music Assistant integration creates a button entity per player to favorite the current song. Pressing this button entity manually or by an automation, will attempt to add the currently playing song to your Music Assistant favorites. This will work for local playing songs, tracks from streaming providers and if/when remote content such as Spotify Connect, AirPlay or even a radio station is playing, as long as the external source provides an artist and title combination (and optionally the album). Note that the button will be marked as unavailable if there is no content playable that could be favorited.

Copy link
Contributor

coderabbitai bot commented Jun 25, 2025

📝 Walkthrough

Walkthrough

The documentation for the Music Assistant integration in Home Assistant was updated to describe new support for the Button platform. It now details a button entity per player that allows users to favorite the currently playing song, applicable to various content types when metadata is available.

Changes

File(s) Change Summary
source/_integrations/music_assistant.markdown Added documentation for Button platform support and the "Favorite current song" button functionality.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HomeAssistant
    participant MusicAssistant
    participant Player

    User->>HomeAssistant: Press "Favorite current song" button
    HomeAssistant->>Player: Get currently playing song metadata
    HomeAssistant->>MusicAssistant: Request to add current song to favorites
    MusicAssistant-->>HomeAssistant: Confirmation/Status update
    HomeAssistant-->>User: Button entity state updated
Loading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (1)
source/_integrations/music_assistant.markdown (1)

12-15: ha_platforms front-matter now out of sync with the actual functionality

The front-matter still declares only the media_player platform, so the new button entity won’t show up in autogenerated lists or the integration overview.
Add button to keep the metadata authoritative.

 ha_platforms:
   - media_player
+  - button
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between e39aa8d and 8eba79b.

📒 Files selected for processing (1)
  • source/_integrations/music_assistant.markdown (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`source/_integrations/*`: Integration documentation must use the provided template structure and section order.

source/_integrations/*: Integration documentation must use the provided template structure and section order.

  • source/_integrations/music_assistant.markdown
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/music_assistant.markdown

23-23: Link fragments should be valid
null

(MD051, link-fragments)


56-56: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - home-assistant-docs
  • GitHub Check: Header rules - home-assistant-docs
  • GitHub Check: Pages changed - home-assistant-docs

Comment on lines 52 to 56
### Favorite current song button

The Music Assistant integration creates a button entity per player to favorite the current song. Pressing this button entity manually or by an automation, will attempt to add the currently playing song to your Music Assistant favorites. This will work for local playing songs, tracks from streaming providers and if/when remote content such as Spotify Connect, AirPlay or even a radio station is playing, as long as the external source provides an artist and title combination (and optionally the album). Note that the button will be marked as unavailable if there is no content playable that could be favorited.


Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Heading naming & spacing violate template and break anchor; extra blank line

  1. Template expects a plain ### Button section, not a customised title.
  2. Using the standard heading automatically yields the #button anchor, fixing the link above.
  3. Two consecutive blank lines (MD012) slip in after the paragraph.
-### Favorite current song button
+### Button
@@
-Note that the button will be marked as unavailable if there is no content playable that could be favorited.
-
+Note that the button will be marked as unavailable if there is no content playable that could be favorited.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Favorite current song button
The Music Assistant integration creates a button entity per player to favorite the current song. Pressing this button entity manually or by an automation, will attempt to add the currently playing song to your Music Assistant favorites. This will work for local playing songs, tracks from streaming providers and if/when remote content such as Spotify Connect, AirPlay or even a radio station is playing, as long as the external source provides an artist and title combination (and optionally the album). Note that the button will be marked as unavailable if there is no content playable that could be favorited.
### Button
The Music Assistant integration creates a button entity per player to favorite the current song. Pressing this button entity manually or by an automation, will attempt to add the currently playing song to your Music Assistant favorites. This will work for local playing songs, tracks from streaming providers and if/when remote content such as Spotify Connect, AirPlay or even a radio station is playing, as long as the external source provides an artist and title combination (and optionally the album). Note that the button will be marked as unavailable if there is no content playable that could be favorited.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

56-56: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

🤖 Prompt for AI Agents
In source/_integrations/music_assistant.markdown around lines 52 to 56, the
heading "### Favorite current song button" should be renamed to the standard
"### Button" to comply with the template and fix the broken anchor link. Also,
remove the extra blank line after the paragraph to avoid consecutive blank lines
and adhere to markdown style guidelines.

@c0ffeeca7 c0ffeeca7 added the parent-merged The parent PR has been merged already label Jun 25, 2025
c0ffeeca7 and others added 2 commits June 25, 2025 09:26
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
source/_integrations/music_assistant.markdown (1)

51-55: Heading violates template + extra blank line

Docs for integration platforms must use the canonical ### Button heading; diverging breaks uniform anchors and lint checks. The consecutive blank line after the paragraph also triggers MD012.

-### Favorite current song button
+### Button
@@
-Note that the button will be marked as unavailable if there is no content playable that could be favorited.
-
+Note that the button will be marked as unavailable if no favoritable content is currently playing.
🧹 Nitpick comments (1)
source/_integrations/music_assistant.markdown (1)

22-24: Anchor & wording drift from integration template

  1. The template expects the Button entry to link to #button; adjusting the anchor keeps navigation consistent across all docs.
  2. Minor wording tweak removes filler “of”.
- - [Button](#favorite-current-song-button)
- All of the Home Assistant [Media Player Control Actions](https://www.home-assistant.io/integrations/media_player/#media-control-actions) are supported.
+ - [Button](#button)
+ All Home Assistant [Media Player Control Actions](https://www.home-assistant.io/integrations/media_player/#media-control-actions) are supported.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 10f8376 and 53f486b.

📒 Files selected for processing (1)
  • source/_integrations/music_assistant.markdown (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`source/_integrations/*`: Integration documentation must use the provided template structure and section order.

source/_integrations/*: Integration documentation must use the provided template structure and section order.

  • source/_integrations/music_assistant.markdown
🪛 LanguageTool
source/_integrations/music_assistant.markdown

[style] ~23-~23: Consider removing “of” to be more concise
Context: ...Button All of the Home Assistant [Media Player Control Ac...

(ALL_OF_THE)

🪛 markdownlint-cli2 (0.17.2)
source/_integrations/music_assistant.markdown

55-55: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

Copy link
Contributor

@c0ffeeca7 c0ffeeca7 left a comment

Choose a reason for hiding this comment

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

Thank you, @marcelveldt 👍

@c0ffeeca7 c0ffeeca7 enabled auto-merge (squash) June 25, 2025 07:32
@c0ffeeca7 c0ffeeca7 merged commit 9022290 into next Jun 25, 2025
8 of 9 checks passed
@c0ffeeca7 c0ffeeca7 deleted the mass-favorite-button branch June 25, 2025 07:34
@home-assistant home-assistant bot removed the parent-merged The parent PR has been merged already label Jun 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
source/_integrations/music_assistant.markdown (1)

51-55: Use standard heading & remove extra blank line to satisfy template + MD012.

  1. Rename the heading to exactly ### Button; the template insists on the plain platform name.
  2. Dropping the bespoke title automatically resolves the anchor warned above.
  3. One blank line is sufficient between sections – the second triggers MD012.
-### Favorite current song button
-
-The Music Assistant integration creates a button entity for each player to favorite the current song. Pressing this button (manually or by automation) adds the current song to your Music Assistant favorites. This works for local playing songs and tracks from streaming providers. It also works with remote content such as Spotify Connect, AirPlay, or a radio station, as long as the external source provides an artist and title combination (and optionally the album). Note that the button will be marked as unavailable if there is no content playable that could be favorited.
-
-
+### Button
+
+The Music Assistant integration creates a button entity for each player to favorite the current song. Pressing this button (manually or by automation) adds the current song to your Music Assistant favorites. This works for local playing songs and tracks from streaming providers. It also works with remote content such as Spotify Connect, AirPlay, or a radio station, as long as the external source provides an artist and title combination (and optionally the album). Note that the button will be marked as unavailable if there is no content playable that could be favorited.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 53f486b and 90cda07.

📒 Files selected for processing (1)
  • source/_integrations/music_assistant.markdown (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`source/_integrations/*`: Integration documentation must use the provided template structure and section order.

source/_integrations/*: Integration documentation must use the provided template structure and section order.

  • source/_integrations/music_assistant.markdown
🪛 LanguageTool
source/_integrations/music_assistant.markdown

[style] ~23-~23: Consider removing “of” to be more concise
Context: ...Button All of the Home Assistant [Media Player Control Ac...

(ALL_OF_THE)

🪛 markdownlint-cli2 (0.17.2)
source/_integrations/music_assistant.markdown

55-55: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - home-assistant-docs
  • GitHub Check: Header rules - home-assistant-docs
  • GitHub Check: Pages changed - home-assistant-docs

Comment on lines 22 to 24
- [Media player](#media-player)

- [Button](#favorite-current-song-button)
All of the Home Assistant [Media Player Control Actions](https://www.home-assistant.io/integrations/media_player/#media-control-actions) are supported.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Anchor mismatch with template – update link slug to #button.

The template’s platform index expects the canonical “### Button” section which generates the #button slug.
Keeping a custom slug silently breaks other docs that rely on the standard structure and trips MD051.

- - [Button](#favorite-current-song-button)
+ - [Button](#button)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [Media player](#media-player)
- [Button](#favorite-current-song-button)
All of the Home Assistant [Media Player Control Actions](https://www.home-assistant.io/integrations/media_player/#media-control-actions) are supported.
- [Media player](#media-player)
- [Button](#button)
All of the Home Assistant [Media Player Control Actions](https://www.home-assistant.io/integrations/media_player/#media-control-actions) are supported.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: A punctuation mark might be missing here.
Context: ...me Assistant Platforms: - Media player - Button A...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~23-~23: Consider removing “of” to be more concise
Context: ...Button All of the Home Assistant [Media Player Control Ac...

(ALL_OF_THE)

🪛 markdownlint-cli2 (0.17.2)

22-22: Link fragments should be valid
null

(MD051, link-fragments)

🤖 Prompt for AI Agents
In source/_integrations/music_assistant.markdown around lines 22 to 24, the link
slug for the Button section is incorrectly set to #favorite-current-song-button
instead of the canonical #button. Update the link slug to #button to match the
template’s expected anchor, ensuring consistency and preventing broken links or
markdown linting errors.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has-parent This PR has a parent PR in a other repo next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants