#Hide Dashboard Button Card based on state attribute.

1 messages · Page 1 of 1 (latest)

weak iris
#

Is there some way to control the visibility of a lovelace card based on an attribute of a state?

For example, I want to check the current_activity attribute:

For reference, I'm using the android_tv_remote integration.

I pulled the state using the developer tools.

activity_list:
  - Plex
  - Disney+
  - Backdrop
  - Home
current_activity: Plex
friendly_name: Shield Living Room
supported_features: 4

and only show certain cards based on the value of current_activity

The UI only lets me slect from "On/Off/Unavailable/Unknown"

Is this something i'd have to manually code in the Yaml using a template?

timid flume
#

Yes you will need a template. You can add one in the UI though, doesn't have to be YAML.

weak iris
#

How?

#

I was pretty sure I could, but I'm not clear on how?

timid flume
#

Config -> Helpers -> Add Helper -> Template -> Binary Sensor

weak iris
#

I saw that, and dismissed it as the state isn't binary, but that clearly was a mistake :p

I'll have a look, thank you

#

Can you point me at an example template?

the templat language is not one i'm familiar with

#

the entity is remote.android_tv_livingroom