#Only show a card depending on an attribute of a state

1 messages · Page 1 of 1 (latest)

supple glacier
#

My specific example is I want to only show the Spotify card if the source is something specific - E.g. "My Computer", "Kitchen" etc.

I am trying to use the UI for this, but I only see 'State' options for 'on', 'playing', etc.

I am trying to leverage the state attribute 'source'.

I tried

condition: state
entity: media_player.spotify_teodatank
attribute: source
value: MAIN-GAMINGDDN

But I am getting a warning about the Visual editor not being able to handle it.

I'm curious how y'all recommend I do this - Is it still config.yaml manual automation?

summer nacelle
#

You can't use an attribute for a visibility condition.

#

You can make the attribute into a sensor with a template, and then use that.

supple glacier
#

Thanks, that's what I ended up doing but with this it's never "re-appearing". Is that normal?