Closed bishengliu7 closed 8 months ago
Hi @bishengliu7
I know of this problem, and its the same thing with my soundbar (Q935). The thing is that the Smartthings API (for some reason I don't understand) is not returning wifi
when using AirPlay or Spotify but ""
.
Thinking about it, I could make an extra step and still return wifi
if the app is spotify
or airplay
.
The proposed changed would be something like this in the SoundbarDevice.py
@property
def input_source(self):
if self.media_app_name() in ("airplay", "spotify"): # added
return "wifi" # added
return self.device.status.input_source
This is a bit "hacky", but it could / should work.
I will try it out as soon as possible.
Hi @bishengliu7,
I released a new beta version, where I fixed this issue / feature. You can try it out and tell me if it works for you.
https://github.com/samuelspagl/ha_samsung_soundbar/releases/tag/0.3.0b2
For more information on how to install a "pre-release" please read the official HACS documentation.
Hope that helps.
Hi @bishengliu7,
I released a new beta version, where I fixed this issue / feature. You can try it out and tell me if it works for you.
https://github.com/samuelspagl/ha_samsung_soundbar/releases/tag/0.3.0b2
For more information on how to install a "pre-release" please read the official HACS documentation.
Hope that helps.
SGTM, i'll try that today. Thanks for the fast response!
seems not working, the value of input preset is still unknown
i moved the beta version to custom_components directory and rebooted my ha
Can you try one thing for me please.
Do you have the SmartThings App on your mobile Device?
Could you open it, tap on your Soundbar (given that you stream music with AirPlay
or Spotify
) and take a look if something changes?
Interestingly I saw on my end that, the media_app
, in my case AirPlay
or Spotify
sometimes is only being reported when the SmartThings App was opened.
Can you show me the complete state of the media_player
entity?
Thanks a lot!
Seems also my case! that's tricky... when soundbar is off: when airplay without turning on app after opening app and tap the sound bar
But the source now is listed correctly as wifi in the third image.
So this is again a case of "What the heck is the SmartThings API doing?" for me 😄. Until now I thought that it was maybe just my device, but as you can confirm the same behavior, it's official 😅.
So honestly I don't know how to make a change / fix this entirely. I know that there are API commands that control / fetch info for every aspect of the soundbar, but as they are not listed anywhere its kinda hard to guess.
yeah...seems the media type is not updated as soon as input source changed
I'm wondering if it is possible to add a default input source? so we can some how hack it in the HA automation, like treat the default input source as airplay. Currently it is 'unknown' seems not able to be used as a condition in automation
Let me think about that. So I'm not sure about the naming, but I think that I would be fine to add the "unknown"
state to the souce_list
and specifically set it as a value if nothing is returned by the SmartThings API.
I'm using sound bar Q990B, when I do AirPlay, the ha device would have empty input source showing, while other input sources like bluetooth or digital worked well. Here's some screenshot in HA:
entity state history:
should be a same issue as https://github.com/PiotrMachowski/Home-Assistant-custom-components-SmartThings-Soundbar/issues/52