Create binary sensor for media_player source

I’m trying to create a template binary sensor that will tell me if the TV is set to a specific source, but this always returns false, even though the TV is definitely set to HDMI 1

{{ is_state((state_attr("media_player.sony_bravia_tv", "source"|string)),"HDMI 1"|string) }}

Furthermore confusing, is that the output of this:

{{ state_attr("media_player.sony_bravia_tv", "source") }}

is ‘HDMI 1’

What am I doing wrong?

{{ is_state_attr("media_player.sony_bravia_tv", "source", "HDMI 1") }}

That worked! Thank you!

Fun fact, I also have a Sony Bravia but it apparently doesn’t expose the ‘source’ attribute, but only the ‘source_list’ one…someone suffered the same?