Dixey
September 1, 2023, 1:55am
1
I need help… bad… before I pull my remaining hair out…
I’m trying to use an input_select:
(config file)
input_select:
alexa_select:
name: Alexa Dots
options:
- media_player.bathroom_a_echo
- media_player.bedroom_a_echo
- media_player.livingroom_a_echo
- media_player.bedroom_echo
- media_player.kitchen_echo
- media_player.utility_echo
- media_player.garage_echo
- media_player.front_porch_echo
to feed my mini-media-player entity:
(ui-lovelace file)
cards:
- type: entities
entities:
- input_select.alexa_select
- type: custom:mini-media-player
entity: >-
{{ states('input_select.alexa_select') }}
instead of what’s expected with a hard coded like:
entity: media_player.livingroom_a_echo
and I get the error:
"Specify an entity from within the media player domain:
type: custom:mini-media-player
entity: '{{ states(''input_select.alexa_select'') }}'
Anyone got an idea of what I’m doing wrong?
Most cards do not accept templates… there is no indication in the Mini Media Player docs that they are accepted.
Try placing the mini-media-player card inside a custom:config-template-card.
Kind of (untested):
cards:
- type: entities
entities:
- input_select.alexa_select
- type: custom:config-template-card
entities:
- input_select.alexa_select
card:
type: custom:mini-media-player
entity: >-
${ states['input_select.alexa_select'].state }
1 Like
Dixey
September 1, 2023, 2:41am
4
Well, we gave it the old college try:
mapping values are not allowed here in "/config/ui-lovelace.yaml", line 2146, column 18
kbrown01
(Kbrown01)
September 1, 2023, 3:03am
5
So you want an input select to be the source for a media_player card? Changing the input select would change the source for the card?
Dixey
September 1, 2023, 3:23am
6
I’m wanting the input_select: value to be used as the entity: (name) of the echo device used for the mini-media-player. It’s a bit confusing… the “source” when you are using sonos is the speaker name but I don’t think that applies to Amazon echo devices.
kbrown01
(Kbrown01)
September 1, 2023, 4:30am
7
Yes it is totally confusing. The card is only displaying things … why not conditional cards that only show the media player for the current selected item? Perhaps pictures would help.
Then check it in UI first, you seem to have problems in your yaml.
Add this via UI.
type: custom:config-template-card
entities:
- input_select.alexa_select
card:
type: custom:mini-media-player
entity: >-
${ states['input_select.alexa_select'].state }
Dixey
September 5, 2023, 1:08pm
9
Okay! This works! I don’t quite get it but… this works!
- title: Jukebox
id: jukebox
cards:
- type: entities
entities:
- input_select.alexa_select
- type: custom:config-template-card
entities:
- input_select.alexa_select
card:
type: custom:mini-media-player
entity: >-
${ states['input_select.alexa_select'].state }
artwork: cover
THANK YOU VERY, VERY MUCH!