Skip to content

Update service examples for HEOS integration#33591

Merged
klaasnicolaas merged 1 commit into
currentfrom
klaas-2024-005
Jul 6, 2024
Merged

Update service examples for HEOS integration#33591
klaasnicolaas merged 1 commit into
currentfrom
klaas-2024-005

Conversation

@klaasnicolaas
Copy link
Copy Markdown
Member

@klaasnicolaas klaasnicolaas commented Jul 6, 2024

Proposed change

Improvement of the service examples

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

  • New Features

    • Standardized service calls for HEOS devices in Home Assistant, enabling easier and more consistent interaction for actions like signing in, playing media, and managing groups.
  • Enhancements

    • Improved clarity and simplicity in service invocation by adopting a consistent service: and data: structure for all HEOS-related commands.

@home-assistant home-assistant Bot added the current This PR goes into the current branch label Jul 6, 2024
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 6, 2024

Walkthrough

Walkthrough

The changes standardize the structure for calling HEOS services through Home Assistant by unifying service invocation syntax across various commands. This includes transitioning to a service: <service_name> and data: <payload> syntax to clarify the control of devices, enhancing usability, and simplifying the integration process.

Changes

Files Change Summary
source/_integrations/heos.markdown Updated service data payloads to standardize to service: <service_name> and data: <payload> format.
Other files with media_player.play_media Updated to standardized format for playing media, playlists, and favorites.
Other files with media_player.join and ... Updated to standardized service invocation for grouping and ungrouping media players.

Sequence Diagram(s)

N/A

Assessment against linked issues

Objective Addressed Explanation
Clarify how to call the heos.sign_in service (#33176)

Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between c927bf2 and 47967ce.

Files selected for processing (1)
  • source/_integrations/heos.markdown (8 hunks)
Additional context used
LanguageTool
source/_integrations/heos.markdown

[misspelling] ~37-~37: Possible spelling mistake found.
Context: ...oper Tools -> Services and then run the heos.sign_in with your username and passwor...

(MORFOLOGIK_RULE_EN_US)


[style] ~37-~37: In contexts where ‘if’ is followed by ‘or’, using ‘whether’ may be more appropriate (and formal).
Context: ... logs right after, there you should see if the sign-in was successful or not) to s...

(IF_WHETHER)


[misspelling] ~37-~37: Possible spelling mistake found.
Context: ...to sign the connected controller into a HEOS account so that it can retrieve and pla...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~37-~37: Possible spelling mistake found.
Context: ...ccount so that it can retrieve and play HEOS favorites and playlists. An error messa...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~59-~59: Possible spelling mistake found.
Context: ...ia #### Play favorite You can play a HEOS favorite by number or name with theme...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~77-~77: Possible spelling mistake found.
Context: ...e | #### Play playlist You can play a HEOS playlist with the `media_player.play_me...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~95-~95: Possible spelling mistake found.
Context: ... #### Play Quick Select You can play a HEOS Quick Select by number or name with the...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~113-~113: Possible spelling mistake found.
Context: ... Play URL You can play a URL through a HEOS media player using the `media_player.pl...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~113-~113: Possible spelling mistake found.
Context: ... media_player.play_media service. The HEOS player must be able to reach the URL. E...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~131-~131: Possible spelling mistake found.
Context: ...rvice media_player.join For grouping HEOS media players together for synchronous ...

(MORFOLOGIK_RULE_EN_US)


[style] ~131-~131: Consider removing “of” to be more concise
Context: ...yer.bathroom` players. Please note that all of the media players need to be HEOS players. ...

(ALL_OF_THE)


[misspelling] ~131-~131: Possible spelling mistake found.
Context: ...hat all of the media players need to be HEOS players. ```yaml service: media_player...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~150-~150: Possible spelling mistake found.
Context: ...e media_player.unjoin For removing a HEOS player from a group you can use the `me...

(MORFOLOGIK_RULE_EN_US)


[uncategorized] ~150-~150: Possible missing comma found.
Context: ...oin For removing a HEOS player from a group you can use themedia_player.unjoin` s...

(AI_HYDRA_LEO_MISSING_COMMA)


[misspelling] ~150-~150: Possible spelling mistake found.
Context: ...EOS player from a group you can use the media_player.unjoin service. ```yaml service: media_playe...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~160-~160: Possible spelling mistake found.
Context: ...| | entity_id | yes | Unjoin this media player from any player group...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~165-~165: Possible spelling mistake found.
Context: ...off by the integration at this time. - Denon AVR and HEOS m...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~165-~165: Possible spelling mistake found.
Context: ...e integration at this time. - Denon AVR and HEOS media players can be combine...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~165-~165: Possible spelling mistake found.
Context: ...Denon AVR and HEOS media players can be combined into a [U...

(MORFOLOGIK_RULE_EN_US)

Additional comments not posted (5)
source/_integrations/heos.markdown (5)

167-167: LGTM!

The troubleshooting section looks good.


167-167: LGTM!

The debugging section looks good.


167-167: LGTM!

The missing favorites section looks good.


113-113: Fix spelling mistake.

Correct the spelling mistake in the section header.

- The HEOS player must be able to reach the URL. E...
+ The HEOS player must be able to reach the URL. Example...

Likely invalid or redundant comment.

Tools
LanguageTool

[misspelling] ~113-~113: Possible spelling mistake found.
Context: ... Play URL You can play a URL through a HEOS media player using the `media_player.pl...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~113-~113: Possible spelling mistake found.
Context: ... media_player.play_media service. The HEOS player must be able to reach the URL. E...

(MORFOLOGIK_RULE_EN_US)


113-113: Fix spelling mistake.

Correct the spelling mistake in the section header.

- #### Play URL
+ #### Play Url

Likely invalid or redundant comment.

Tools
LanguageTool

[misspelling] ~113-~113: Possible spelling mistake found.
Context: ... Play URL You can play a URL through a HEOS media player using the `media_player.pl...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~113-~113: Possible spelling mistake found.
Context: ... media_player.play_media service. The HEOS player must be able to reach the URL. E...

(MORFOLOGIK_RULE_EN_US)


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 6, 2024

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 47967ce
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/668933fc568d07000808cf58
😎 Deploy Preview https://deploy-preview-33591--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 site configuration.

Copy link
Copy Markdown
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Nice, thanks, @klaasnicolaas 👍

../Frenck

@klaasnicolaas klaasnicolaas merged commit a9042da into current Jul 6, 2024
@klaasnicolaas klaasnicolaas deleted the klaas-2024-005 branch July 6, 2024 12:12
Copy link
Copy Markdown
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: 8


| Service data attribute | Optional | Description |
| ---------------------- | -------- | ------------------------------------------------ |
| `entity_id` | yes | Unjoin this media player from any player groups. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix spelling mistake.

Correct the spelling mistake in the description.

- Unjoin this media player from any player group...
+ Unjoin this media player from any player groups...

Committable suggestion was skipped due to low confidence.

Tools
LanguageTool

[misspelling] ~160-~160: Possible spelling mistake found.
Context: ...| | entity_id | yes | Unjoin this media player from any player group...

(MORFOLOGIK_RULE_EN_US)

@@ -121,10 +131,12 @@ media_content_id: "http://path.to/stream.mp3"
For grouping HEOS media players together for synchronous playback you can use the `media_player.join` service. With the example service data payload down below you'll expand playback of `media_player.office` to the `media_player.kitchen` and `media_player.bathroom` players. Please note that all of the media players need to be HEOS players.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix spelling and improve clarity.

Correct the spelling mistake and remove unnecessary 'of' for conciseness.

- Please note that all of the media players need to be HEOS players.
+ Please note that all the media players need to be HEOS players.

Committable suggestion was skipped due to low confidence.

Tools
LanguageTool

[misspelling] ~131-~131: Possible spelling mistake found.
Context: ...rvice media_player.join For grouping HEOS media players together for synchronous ...

(MORFOLOGIK_RULE_EN_US)


[style] ~131-~131: Consider removing “of” to be more concise
Context: ...yer.bathroom` players. Please note that all of the media players need to be HEOS players. ...

(ALL_OF_THE)


[misspelling] ~131-~131: Possible spelling mistake found.
Context: ...hat all of the media players need to be HEOS players. ```yaml service: media_player...

(MORFOLOGIK_RULE_EN_US)

@@ -89,9 +95,11 @@ media_content_id: "Awesome Music"
You can play a HEOS Quick Select by number or name with the `media_player.play_media` service. Example service data payload:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix spelling mistake.

Correct the spelling mistake in the section header.

- #### Play Quick Select
+ #### Play Quick select

Committable suggestion was skipped due to low confidence.

Tools
LanguageTool

[misspelling] ~95-~95: Possible spelling mistake found.
Context: ... #### Play Quick Select You can play a HEOS Quick Select by number or name with the...

(MORFOLOGIK_RULE_EN_US)

@@ -57,9 +59,11 @@ Use the sign-out service to sign the connected controller out of a HEOS account.
You can play a HEOS favorite by number or name with the `media_player.play_media` service. Example service data payload:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix spelling mistake.

Correct the spelling mistake in the section header.

- #### Play favorite
+ #### Play Favorite
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
You can play a HEOS favorite by number or name with the `media_player.play_media` service. Example service data payload:
You can play a HEOS favorite by number or name with the `media_player.play_media` service. Example service data payload:
Tools
LanguageTool

[misspelling] ~59-~59: Possible spelling mistake found.
Context: ...ia #### Play favorite You can play a HEOS favorite by number or name with theme...

(MORFOLOGIK_RULE_EN_US)

@@ -73,9 +77,11 @@ media_content_id: "1"
You can play a HEOS playlist with the `media_player.play_media` service. Example service data payload:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix spelling mistake.

Correct the spelling mistake in the section header.

- #### Play playlist
+ #### Play Playlist

Committable suggestion was skipped due to low confidence.

Tools
LanguageTool

[misspelling] ~77-~77: Possible spelling mistake found.
Context: ...e | #### Play playlist You can play a HEOS playlist with the `media_player.play_me...

(MORFOLOGIK_RULE_EN_US)

@@ -137,6 +149,12 @@ group_members:

For removing a HEOS player from a group you can use the `media_player.unjoin` service.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix spelling and missing comma.

Correct the spelling mistake and add a missing comma.

- For removing a HEOS player from a group you can use the `media_player.unjoin` service.
+ For removing a HEOS player from a group, you can use the `media_player.unjoin` service.
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
For removing a HEOS player from a group you can use the `media_player.unjoin` service.
For removing a HEOS player from a group, you can use the `media_player.unjoin` service.
Tools
LanguageTool

[misspelling] ~150-~150: Possible spelling mistake found.
Context: ...e media_player.unjoin For removing a HEOS player from a group you can use the `me...

(MORFOLOGIK_RULE_EN_US)


[uncategorized] ~150-~150: Possible missing comma found.
Context: ...oin For removing a HEOS player from a group you can use themedia_player.unjoin` s...

(AI_HYDRA_LEO_MISSING_COMMA)


[misspelling] ~150-~150: Possible spelling mistake found.
Context: ...EOS player from a group you can use the media_player.unjoin service. ```yaml service: media_playe...

(MORFOLOGIK_RULE_EN_US)

@@ -146,7 +164,7 @@ For removing a HEOS player from a group you can use the `media_player.unjoin` se
- Receivers with multiple zones are represented as a single media player. They will be turned on when playback is started, but cannot be turned off by the integration at this time.
- [Denon AVR](/integrations/denonar/) and HEOS media players can be combined into a [Universal Media Player](/integrations/universal/#denon-avr--heos)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix spelling mistakes.

Correct the spelling mistakes in the notes section.

- [Denon AVR](/integrations/denonar/) and HEOS media players can be combined into a [Universal Media Player](/integrations/universal/#denon-avr--heos)
+ [Denon AVR](/integrations/denon_avr/) and HEOS media players can be combined into a [Universal Media Player](/integrations/universal/#denon-avr--heos)
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
- [Denon AVR](/integrations/denonar/) and HEOS media players can be combined into a [Universal Media Player](/integrations/universal/#denon-avr--heos)
[Denon AVR](/integrations/denon_avr/) and HEOS media players can be combined into a [Universal Media Player](/integrations/universal/#denon-avr--heos)
Tools
LanguageTool

[misspelling] ~165-~165: Possible spelling mistake found.
Context: ...off by the integration at this time. - Denon AVR and HEOS m...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~165-~165: Possible spelling mistake found.
Context: ...e integration at this time. - Denon AVR and HEOS media players can be combine...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~165-~165: Possible spelling mistake found.
Context: ...Denon AVR and HEOS media players can be combined into a [U...

(MORFOLOGIK_RULE_EN_US)

@@ -37,8 +37,10 @@ A connection to a single device enables control for all devices on the network.
Use the sign-in service (go to Developer Tools -> Services and then run the `heos.sign_in` with your username and password. Use the "Fill example data" first, then change it with your data. Check the logs right after, there you should see if the sign-in was successful or not) to sign the connected controller into a HEOS account so that it can retrieve and play HEOS favorites and playlists. An error message is logged if sign-in is unsuccessful. Example service data payload:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix spelling and improve clarity.

Correct the spelling mistakes and use 'whether' for better clarity.

- heos.sign_in` with your username and passwor...
+ heos.sign_in` with your username and password...

- there you should see if the sign-in was successful or not
+ there you should see whether the sign-in was successful or not
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
Use the sign-in service (go to Developer Tools -> Services and then run the `heos.sign_in` with your username and password. Use the "Fill example data" first, then change it with your data. Check the logs right after, there you should see if the sign-in was successful or not) to sign the connected controller into a HEOS account so that it can retrieve and play HEOS favorites and playlists. An error message is logged if sign-in is unsuccessful. Example service data payload:
Use the sign-in service (go to Developer Tools -> Services and then run the `heos.sign_in` with your username and password. Use the "Fill example data" first, then change it with your data. Check the logs right after, there you should see whether the sign-in was successful or not) to sign the connected controller into a HEOS account so that it can retrieve and play HEOS favorites and playlists. An error message is logged if sign-in is unsuccessful. Example service data payload:
Tools
LanguageTool

[misspelling] ~37-~37: Possible spelling mistake found.
Context: ...oper Tools -> Services and then run the heos.sign_in with your username and passwor...

(MORFOLOGIK_RULE_EN_US)


[style] ~37-~37: In contexts where ‘if’ is followed by ‘or’, using ‘whether’ may be more appropriate (and formal).
Context: ... logs right after, there you should see if the sign-in was successful or not) to s...

(IF_WHETHER)


[misspelling] ~37-~37: Possible spelling mistake found.
Context: ...to sign the connected controller into a HEOS account so that it can retrieve and pla...

(MORFOLOGIK_RULE_EN_US)


[misspelling] ~37-~37: Possible spelling mistake found.
Context: ...ccount so that it can retrieve and play HEOS favorites and playlists. An error messa...

(MORFOLOGIK_RULE_EN_US)

@github-actions github-actions Bot locked and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

current This PR goes into the current branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please explain in more detail how to call the heos.sign_in service

2 participants