fitsou
(Fitsou)
September 27, 2023, 8:39am
1
Good day to the community,
I have the card layout for Media Players, as displayed in the screenshot below:
My inquiry is whether there is a way to merge all these cards into one and display only the active card.
For example, when Plex is in use and actively playing a movie, I would like to see only that specific card.
pcwii
(Pcwii)
September 27, 2023, 9:10am
2
Sounds like you may be asking different things.
A conditional card will only show that card based on a condition.
A “stack” card will let you combine multiple cards in a single stack, either vertical or horizontal.
fitsou
(Fitsou)
September 27, 2023, 9:58am
3
I cannot get it to work. in Edit mode it displays my TV, but when i press done it goes away.
My code is:
type: conditional
conditions:
- entity: media_player.nicks_tv_3
state_not: 'off'
- entity: media_player.plex_plex_for_android_tv_nick_s_tv
state_not: 'off'
- entity: media_player.playstation_5
state_not: 'off'
- entity: media_player.spotify_nick_dekoulis
state_not: 'off'
card:
type: media-control
entity: media_player.nicks_tv_3
fitsou
(Fitsou)
September 27, 2023, 11:51am
4
After playing a little I manage to fix the issue of displaying one card only. But still after i press done the card disappears.
type: conditional
conditions:
- entity: media_player.nicks_tv_3
state_not: 'off'
- entity: media_player.plex_plex_for_android_tv_nick_s_tv
state_not: 'off'
- entity: media_player.playstation_5
state_not: 'off'
- entity: media_player.spotify_nick_dekoulis
state_not: 'off'
card:
type: custom:layout-card
layout_type: custom:masonry-layout
layout: {}
cards:
- type: media-control
entity: media_player.nicks_tv_3
- type: media-control
entity: media_player.plex_plex_for_android_tv_nick_s_tv
- type: media-control
entity: media_player.spotify_nick_dekoulis
- type: media-control
entity: media_player.playstation_5
fitsou
(Fitsou)
October 4, 2023, 1:05pm
5
Still looking for a way to add multiple media players into one.
pcwii
(Pcwii)
October 4, 2023, 5:36pm
6
I am pretty sure that the conditional card uses “And” for its conditions, therefore they must all be true for it to display. There is likely more throughout this forum on this and there may be a way to get around this. Maybe with some group helper or something like that.
blankf
January 27, 2025, 7:12am
7
Although this seems to be an older topic, if someone comes across it like i did:
have a look at: Universal Mediaplayer seems to combine media_player