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?