-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Add sound mode support #4470
Add sound mode support #4470
Conversation
- this time with the next branch as base
Added the documentation for the new general sound mode support service. General basis is there for all platforms, but only the Denon AVR component is currently implemented (first release).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@starkillerOG I've reviews the docs and left some comments. Could you please take a look? Thx already! 👍
@@ -48,6 +48,8 @@ media_player: | |||
name: NAME | |||
show_all_sources: True / False | |||
timeout: POSITIVE INTEGER | |||
sound_mode: True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are trying to keep the examples as minimal as possible. Please remove the added optional configuration paramters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the sound_mode. But I would like to keep the sound_mode_dict in the example because this is a somewhat difficult parameter, for example if you put " " around it and make it a string it will not work anymore. And if I remember corectly the values in this dict schould be uppercase, otherwise the values received from the AVR will not match. And a dictionary is in general a little more difficult then just a string or a number for the basic users.
Furthermore the hole zones parameter is also in the example and you do not need that in general and is also optional if you don't use second zones on your AVR.
@@ -59,6 +61,8 @@ Configuration variables: | |||
- **name** (*Optional*): Name of the device. If not set, friendlyName of receiver is used. | |||
- **show_all_sources** (*Optional*): If True all sources are displayed in sources list even if they are marked as deleted in the receiver. If False deleted sources are not displayed (default). Some receivers have a bug that marks all sources as deleted in the interface. In this case this option could help. | |||
- **timeout** (*Optional*): Timeout for HTTP requests to the receiver. Defaults to 2 seconds if not provided. | |||
- **sound_mode** (*Optional*)(*boolean*): Flag that defines if sound mode is supported. Default value: True. | |||
- **sound_mode_dict** (*Optional*): Dictonary containing the sound modes that are supported, the key needs to be identical with the command to set a specific sound mode and the corresponding value needs to be the sound mode as reported by the AVR. Default value: {'MUSIC':'PLII MUSIC', 'MOVIE':'PLII MOVIE', 'GAME':'PLII GAME', 'PURE DIRECT':'DIRECT', 'AUTO':'None', 'DOLBY DIGITAL':'DOLBY DIGITAL', 'MCH STEREO':'MULTI CH STEREO', 'STEREO':'STEREO'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dictonary
->Dictionary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking my bad spelling
@@ -68,5 +72,6 @@ A few notes: | |||
- Additional option the control Denon AVR receivers with a builtin web server is using the HTTP interface with denonavr platform. | |||
- denonavr platform supports some additional functionalities like album covers, custom input source names and auto discovery. | |||
- Marantz receivers seem to a have quite simliar interface. Thus if you own one, give it a try. | |||
- The key-value structure in the sound_mode_dict is needed because the commands to set an sound mode and the reported sound mode are diffrent. This structure matches the reported sound mode with the commands to set a sound mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diffrent
->different
- Backquote sound_mode_dict keyword
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you make a backquote in this "code"?
- fixed some spelling mistakes
@frenck Thanks for your review, I made changes based on your comments. |
Thanks for the adjustments @starkillerOG 🎖 I'm sorry but I do not review those type of PRs. |
@frenck could you check your request for changes as addressed, so the red cross will go away and it can be merged once the other 2 PR's are accepted? |
@starkillerOG Sorry simply forgot to hit the approve button, my bad... 🤦♂️ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still waiting until my PR of the denonavr library is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@starkillerOG Could you please take a look at the merge conflicts?
@frenck I think I resolved the conflict, but I am still waiting until the backend code can be merged. |
@frenck I think I might have undone your changes, sorry I just wanted to correct the syntax. |
Thank you @frenck |
No! Thank you 👍 |
Closing this PR, since the parent PR has been closed as well. |
Description:
Front end pull request: home-assistant/frontend#815
Pull request in home-assistant (if applicable): home-assistant/core#13706
Checklist:
current
. New documentation for platforms/components and features should go tonext
.