-
-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Support SELECT_SOURCE for Bose soundtouch #31071
Conversation
68cec0d
to
8b3f053
Compare
@@ -78,11 +83,16 @@ | |||
| SUPPORT_PLAY_MEDIA | |||
) | |||
|
|||
SOURCE_SCHEMA = vol.Schema( | |||
{vol.Required(CONF_SOURCE): cv.string, vol.Required(CONF_NAME): cv.string} |
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.
Please check that the source is one of the supported sources of the library.
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.
https://github.com/CharlesBlonde/libsoundtouch , this library is not updated 2 years. no api to check source
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 have the enum Source
available from the library. Can't we use that?
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.
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( | ||
{ | ||
vol.Required(CONF_HOST): cv.string, | ||
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, | ||
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port, | ||
vol.Optional(CONF_RESOURCES): vol.All(cv.ensure_list, [SOURCE_SCHEMA]), |
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.
Why do we need this option? If we know what the device supports, we can just return that list of sources in the media player entity source list.
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.
https://github.com/CharlesBlonde/libsoundtouch , this library is not updated 2 years. no api to get sources that device supported.
so config sources to configuration.yaml
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.
would it make sense to bump libsoundtouch to 0.8.0 since HA is currently using an even older version?
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.
btw - this might be an alternative in future? Just found it https://github.com/trunet/aiobosest
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 like asyncio! If that works it might be a very nice replacement! The repo looks a bit dormant though.
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.
would it make sense to bump libsoundtouch to 0.8.0 since HA is currently using an even older version?
in this pr, libsoundtouch lib already be updated to 0.8.0
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.
Since the sources could be fetched from the api if the library would support it, I don't think adding this config option is a good step forward. We want to avoid config options as much as possible.
Please update or change library first, in a separate PR, and then we see if this PR is still needed.
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.
there is a pending PR over at libsoundtouch which would add a source list, but the maintainer didn't respond to PRs in over a year. CharlesBlonde/libsoundtouch#34
The repo looks a bit dormant though.
Yes, the author of it commented that he wrote it for HA back then but the guys implementing the HA component went with libsoundtouch instead, which is why he stopped working on it. But he seems to be interested in working on it and implement the missing features if we (HA) considers to switch to it.
CharlesBlonde/libsoundtouch#38
I'm not saying we have to or should, especially since libsoundtouch is well documented and it's always a pitty if well used projects either have to be forked or abandoned.
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.
If the maintainer of https://github.com/trunet/aiobosest is active and the maintainer of https://github.com/CharlesBlonde/libsoundtouch is not, I suggest we change to the active library.
c6105f4
to
bce70a4
Compare
d3155b5
to
2ec7c43
Compare
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Breaking change
Proposed change
support SELECT_SOURCE for Bose soundtouch, and show friendly_name
Type of change
Example entry for
configuration.yaml
:Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale: