Hi all,
I’m struggling turning some template tests into a functioning automation in order to keep input selects in sync when scripts etc are called from other than the hass gui (hadashboard for example)
if (for example) i’m listening to classic fm, and drop this into the template editor:
'{{ states.media_player.top_room_audio.attributes.media_content_id }}'
i get the appropriate url:
http://media-the.musicradio.com:80/ClassicFMMP3
however my if statement returns false:
{%- if is_state("media_player.top_room_audio.attributes.media_content_id" , "http://media-the.musicradio.com:80/ClassicFMMP3") -%}
Classic FM
{%- else -%}
Nothing Playing
{%- endif %}
it always gives me the ‘Nothing Playing’ option.
Can anyone point me in the right direction?