I’m not sure what I’m doing wrong. My current card code below; which successfully show a media card only if the media player is playing a media. I could alternatively change the below cards to only show if the media is paused by changing “playing” to “paused” below:
- cards:
- card:
entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
type: media-control
conditions:
- entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
state: playing
type: conditional
- card:
entity: media_player.plex_living_room_plex_for_android_mobile_palm
type: media-control
conditions:
- entity: media_player.plex_living_room_plex_for_android_mobile_palm
state: playing
type: conditional
If I change this code to also display the media cards if they are paused (in addition to playing); neither condition works anymore (see below). Could someone please tell me the correct way to specify my media cards to display for both “playing” or “paused” conditions? Below is what I think it should be. Unfortunately, the below code doesn’t work for either playing or paused conditions:
- cards:
- card:
entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
type: media-control
conditions:
- entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
state: playing
- entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
state: paused
type: conditional
- card:
entity: media_player.plex_living_room_plex_for_android_mobile_palm
type: media-control
conditions:
- entity: media_player.plex_living_room_plex_for_android_mobile_palm
state: playing
- entity: media_player.plex_living_room_plex_for_android_mobile_palm
state: paused
type: conditional
It seems like the reason it doesn’t work is that multiple conditions are implied as an and not or.
The only way I can get the card to display for both conditions is to create two completely separate cards with a single condition in each card like below. However, it seems like there should be a better way to do it:
- cards:
- card:
entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
type: media-control
conditions:
- entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
state: playing
type: conditional
- card:
entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
type: media-control
conditions:
- entity: media_player.plex_plex_for_android_mobile_alyssa_s_tablet
state: paused
type: conditional
- card:
entity: media_player.plex_living_room_plex_for_android_mobile_palm
type: media-control
conditions:
- entity: media_player.plex_living_room_plex_for_android_mobile_palm
state: playing
type: conditional
- card:
entity: media_player.plex_living_room_plex_for_android_mobile_palm
type: media-control
conditions:
- entity: media_player.plex_living_room_plex_for_android_mobile_palm
state: paused
type: conditional