LG Soundbar SN9YG - Switch Input

Hi,

does anybody have an idea how to switch the input on a LG SN9YG Soundbar via Home Assistant?
LG Soundbar Integration doesn’t work because it is a Google Cast Device.

Kind Regards

Did you ever get this sorted?
I seem to have the same issue with my LG DSN8YG. The only available entity is media_player.soundbar which basically only allows you to power on or off. There should be more according to the related integrations page: LG Soundbars - Home Assistant

I’ve discovered GitHub - mafredri/musicflow: This package and its commands can be used to control LG speakers that use the Music Flow app which I was able to switch the input on my LG LA855M soundbar with!

Example usage as the documentation isn’t exactly clear:

$ mufloctl -addr <ip of soundbar>
# it reads JSON-formatted commands from stdin
# change input to PORTABLE
{"data":{"type":2},"msg":"FUNCTION_SET"}
# change volume
{"data":{"fadetime":0,"vol":16},"msg":"VOLUME_SETTING"}

It mentions encryption keys but I didn’t need any of those with mine, YMMV.

The existence of this library indicates it’s possible to build a native HASS integration, which is great news.