I have a card of type: horizontal-stack where the text of the radio station (the song currently playing) is scrolling.
I want the card (the scroll) to only be displayed if the “source” attribute value is “HEOS Music”.
It currently works when the radio status is “playing”, but I now want it to work based on the “source” value.
This is my working code right now:
type: conditional
conditions:
- condition: state
entity: media_player.denon_zone2
state: playing
card:
type: horizontal-stack
cards:
- show_name: true
type: custom:button-card
.....
.....
I can’t get it to work, even with this code:
conditions:
- condition: state
entity: media_player.denon_zone2
attribute: source
state: HEOS Music
of this
conditions:
- condition: template
value_template: "{{ states('media_player.denon_zone2.attributes.source') == 'HEOS Music' }}"
Snippet current state developer tools