How to make an Entities card with entities that don't have an "unavailable" state

I would like to list the below entities ONLY if they don’t have the state, “Unavailable”.

Screenshot

The first thing I tried was an entity-filter card. However, it still shows all the entities that are unavailable:

type: entity-filter
entities:
  - media_player.plex_plex_for_android_mobile_alyssa_s_tablet
  - media_player.plex_plexkodiconnect_plexkodiconnect
  - media_player.plex_plex_for_roku_roku_premiere_yr0036878378
state_filter:
  - operator: '!='
  - Unavailable
card:
  type: entities
  title: Plex

Then, I tried setting up a conditional card… however, it still shows the unavailable entities as well:

type: conditional
conditions:
  - entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
    state_not: Unavailable
  - entity: media_player.plex_plexkodiconnect_plexkodiconnect
    state_not: Unavailable
card:
  type: entities
  entities:
    - entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
    - entity: media_player.plex_plexkodiconnect_plexkodiconnect
  title: Plex
  show_header_toggle: false

I’ve tried several different things, but can’t get this to work. I’d appreciate seeing an example code I can adapt for my entities. Thanks so much in advance.

I had the right idea with the filter-entities card. The correct way to do what I want is the below code for anyone searching for a solution in the future.

type: entity-filter
entities:
  - media_player.plex_plex_for_android_mobile_alyssa_s_tablet
  - media_player.plex_plexkodiconnect_plexkodiconnect
  - media_player.plex_plex_for_roku_roku_premiere_yr0036878378
state_filter:
  - playing
card:
  type: entities
  title: Plex

Did you try “small u” as opposed to “capital U”? Look at the developer tools/ states to find the exact case and spelling of the entity state.

it looks like I was using the wrong states. Below are the valid ones for Plex:

  • ‘on’
  • ‘off’
  • ‘playing’
1 Like

The media players can also show ‘paused’ and ‘idle’.

1 Like