UPDATE: I found this post, which helped me solve my issue. I’ve updated the code below to the working version in case anyone is curious.
I’ve been trying to use auto-entities to generate a list of media players for each room and generate a media controller for each using a decluttering card, but I’m not getting anywhere.
I feel like the below Decluttering Card template is close, but I can’t find any documentation to help me on actually using the entities list from room_media
to make multiple media_controls
cards.
Maybe I’m going about this completely incorrectly - any feedback would be appreciated!
- type: custom:decluttering-card
template: room_media
variables:
- room: Living Room
room_media:
card:
type: custom:auto-entities
card:
show_empty: false
type: custom:vertical-stack-in-card
card_param: cards
filter:
include:
- entity_id: media_player.*
area: "[[room]]"
options:
type: custom:decluttering-card
template: media_controls
variables:
- entity: this.entity_id
media_controls:
card:
type: custom:mushroom-media-player-card
entity: "[[entity]]"
use_media_info: true
volume_controls: []
media_controls:
- shuffle
- previous
- play_pause_stop
- next
collapsible_controls: true
fill_container: true
show_volume_level: true
icon_type: entity-picture
I see that this question was updated to ask something similar, but got no responses. @prankousky did you manage to work this out? (I know it’s an old post, so sorry for the necromancy!).