Open klingbing opened 1 week ago
Hey there @thrawnarn, @louischrist, mind taking a look at this issue as it has been labeled with an integration (bluesound
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
bluesound documentation bluesound source (message by IssueLinks)
Yes i introduced a breaking change in 2024.8 regarding the sources. My intention was to fix the source selection. TuneIn
was a selectable source, but selecting it did not work. Therefore i removed everything that is not selectable on its own and added presets to the list of selectable sources. With presets it is now possible to create one that plays a TuneIn radio station and select it from the sources.
Now to your problem. To be consistent i also changed the currently selected source. It now shows one of the elements of the selectable list if possible(a preset in your case) and if nothing from the list matches the service TuneIn
. You should be able to test this by selecting a radio station manually(maybe one that is not part of any preset).
I think there are multiple solutions:
Preset:
. And then change your condition to check for that prefix(with a template condition).media_player.select_source
action. You would have to do a big choose where you define the order of your preset manually.Thank you for your detailed response.
Yes i introduced a breaking change in 2024.8 regarding the sources.
Apols, I must have overread that one.
It now shows one of the elements of the selectable list if possible(a preset in your case) and if nothing from the list matches the service
TuneIn
. You should be able to test this by selecting a radio station manually(maybe one that is not part of any preset).
I can confirm, if I play back a TuneIn radio station that is not in my presets the media playerssource
attribute switches to TuneIn
I think there are multiple solutions:
- If you do not change the preset names often: You can change your condition to check if the source is one of your preset names(state condition with multiple values).
- If the presets change often: You could prefix them. For example with
Preset:
. And then change your condition to check for that prefix(with a template condition).- You can get rid of the rest command and use the
media_player.select_source
action. You would have to do a big choose where you define the order of your preset manually.- I could add a new entity(or attribute) to the integration which indicates the currently selected service.
Thank you for providing me with those! Further to 1. and 2.: I could also check for „Source is not Spotify“ which works as long as I only use Spotify or TuneIn presets.
Further to 3.: the benefit of using the rest command http://ip:11000/Preset?id=+1
is that the media player will cycle the presets, e.g. if I hit the rest command when playing the last preset it will skip to preset 1 (or whatever is your first preset).
Further to 4.: Preferred (attribute is fine)! ;)
Or as an alternative, if feasible, solution 5., you could consider implementing the functionality of being able to skip presets using media_player.media_next_track
(http://ip:11000/Preset?id=+1
) and media_player.media_previous_track
(http://ip:11000/Preset?id=-1
) when one of the presets is currently playing. A functionality I have always been missing in BluOs and am now able to solve here in HA.
Another benefit: The next/previous track buttons in the mediaplayer actually have a (imho expected) functionality instead of doing nothing when clicked while playing a preset. Let me know what you think and if I should set up a feature request for this.
Again thanks for your help.
The problem
Previously (before the Bluesound integration was moved to UI) the attribute
source:
was "TuneIn" when a TuneIn radio station was played which corresponds to<service>TuneIn</service>
in the Bluesound API.The
source:
has now changed to being "Radio Station name" instead of "TuneIn".Would it be possible to either fix/revert this change or maybe expose an attribute
service:
orinput
to the Bluesound media player entity?The use case behind my request is the following:
I am using physical pushbuttons to control my Bluesound media players, one of these buttons is a "NEXT" button. In the automation triggering the "NEXT" button results in two different actions depending on currently playing source or service (TuneIn or Spotify):
http://192.168.1.16:11000/Preset?id=+1
What version of Home Assistant Core has the issue?
core-2024.9
What was the last working version of Home Assistant Core?
core-2024.7.4
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Bluesound
Link to integration documentation on our website
https://www.home-assistant.io/integrations/bluesound/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response