Possible to create an OR condition for conditional card? (i.e - display if media player state is playing, paused, or idle)

I have a conditional card setup that displays a Media Control card when the TV is playing.

type: conditional
conditions:
  - entity: media_player.65_tcl_roku_tv
    state: playing
card:
  type: media-control
  entity: media_player.65_tcl_roku_tv

I know I can create a 2nd conditional card that shows state “paused” and a 3rd for “idle”. Is there a way to add an OR condition to 1 conditional card? I was hoping I could do something like:

type: conditional
conditions:
  - entity: media_player.65_tcl_roku_tv
    state: playing, paused, idle
card:
  type: media-control
  entity: media_player.65_tcl_roku_tv

or

type: conditional
condition: or
conditions:
  - entity: media_player.65_tcl_roku_tv
    state: playing
  - entity: media_player.65_tcl_roku_tv
    state: idle
card:
  type: media-control
  entity: media_player.65_tcl_roku_tv

but either I am not formatting it correctly or there isn’t a way to do this. Anyone have any ideas on this?

No. Multiple conditions are treated as AND logic. That’s just the way the card is.

You have a couple of options.

  1. Create a binary template sensor with your OR conditions and use that binary sensor in the conditional card,

or

  1. Use the custom State Switch card.
2 Likes

Thanks for the help. I think I’ll with Option 1 for now and experiment with the state-switch card later. I’ve never heard of that one but it looks really promising.