Get TV Source for Button Status


I’m trying to create some scenes where Home Assistant turns on the TV and sets it to different sources (Netflix, HBO Max, YouTube etc.). I achieved this by creating 3 separate scripts that power on the Samsung TV then use the “media_player.select_source” service to change to the sources that I predefined in the integration. (I’m using this integration GitHub - ollo69/ha-samsungtv-smart: 📺 Home Assistant SamsungTV Smart Component with simplified SmartThings API Support configurable from User Interface. )

It all works fine, however I’m using the scripts as buttons and as long as the script finishes running, the button goes off. I’d like the buttons to stay on, reflecting the current status of the TV source. I have created some input_boolean switch which triggers the scripts when turned on and it works ok, those light up. However I’d like to know if there is any way to read that source status into a variable and use it in the switch with the “value_template” parameter; something like

value_template: "{{ is_state('', 'Netflix') }}"

I should specify that I cannot find those source values stored anywhere, rather that in the integration settings.

Thank you!