-
Notifications
You must be signed in to change notification settings - Fork 3
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 ControlBusMode to __init__.py #97
Conversation
Hi @Solmath you probably havent seen my first PR or the description of it. This
was my plan for the Home Assistant integration :)
So yes, I also have prepared a PR in the Home Assistant repo to introduce a switch for control_bus_mode and enable volume control. home-assistant/core#139131 What would you put int CONTROL_BUS_FEATURES ? |
@@ -10,6 +10,7 @@ | |||
State, | |||
Source, | |||
NowPlaying, | |||
ControlBusMode, |
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.
Is this necessary?
The ControlBusMode is accessible from the State
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.
The current setting of the control bus can be accessed with client.state.control_bus
, however the possible values (off, amplifier, receiver) are unknown. Therefore, my idea was to make the enum accessible so its values can be used for comparison wit the current setting.
As a matter of fact I saw it after I had already done the changes on HA side. I had hoped it could be done without any changes in aiostreammagic.
I think only Channel or output selection would be a nice feature, but I don't think the control bus supports that at the moment. I guess we'd have to ask Cambridge Audio for a definitive answer. |
@Solmath I took care of this in my latest commit, didn't see the PR until just now. Closing this. Will review your home-assistant PR once it's ready. |
In addition to the changes by @ichbinsteffen in #92, I think it might be useful to expose ControlBusMode in aiostreammagic.
Then we could add something like
to media_player.py in the HA integration. I have a PR for this ready.
With the recent addition of set_control_bus_mode() in #92 it should be relatively easy to also add an entity for the control bus in HA.