Mini-media-player: [Feature Request] List object to choose one of my Echos

Created on 19 Feb 2019  路  7Comments  路  Source: kalkih/mini-media-player

First of all thank you for your great work. I have a Alexa i every room and it would be awesome if I could choose my device from a list in one mini media player card. Now I have to create a mini card for every device. Would this be possible?

To additional questions:

  1. TTS to all alexas doesn't work with "entity_id: all" What did I wrong?
  2. I have three scripts to start my favorite internet radio channel via tunein with the alexa media player. Now I create three buttons and as source I use script. This works but in the script I have also to specify the entity (e.g. media_player.kitchen). Is there a other easy way to start a internet radio channel via tunein?
question

All 7 comments

First of all thank you for your great work. I have a Alexa i every room and it would be awesome if I could choose my device from a list in one mini media player card. Now I have to create a mini card for every device. Would this be possible?

Thanks!

You could achieve this by setting up an input select, and then use conditional cards to render the entity selected in the input select. There might be a more elegant solution than using conditional cards, since you would have to set up quite a few, but I guess it's mostly copy-paste.

  1. It's possible that it doesn't work in the custom alexa component, have you tried doing it manually to see if it works?

  2. I've never used the custom alexa component or tunein for that matter, but if it does support media_player.play_media you could possibly skip the script and set type: music & id: tunein-uri. diectly in the shortcut.

Thank you for the very quick response ...

You could achieve this by setting up an input select, and then use conditional cards to render the entity selected in the input select. There might be a more elegant solution than using conditional cards, since you would have to set up quite a few, but I guess it's mostly copy-paste.

Sorry that I am so blond but I have no idea how. Do you have an example?

  1. It's possible that it doesn't work in the custom alexa component, have you tried doing it manually to see if it works?

No it doesn't work

2. I've never used the custom alexa component or tunein for that matter, but if it does support media_player.play_media you could possibly skip the script and set type: music & id: tunein-uri. diectly in the shortcut.

I will try but how can I specify the channel like bigFM?
Feedback:
type:music
id: tunein-uri or tunein-bigFM doesn't work ... :(

here a example script:

radio6:
  sequence:
    - service: media_player.play_media
      alias: 1live
      data_template:
        entity_id: media_player.wohnzimmer
        media_content_id: 1live 眉berall
        media_content_type: TUNEIN

Sorry that I am so blond but I have no idea how. Do you have an example?

Don't have an example, but it should be quite easy.

  1. Set up an input select, with one option for each echo you got.
input_select:
  selected_echo:
    name: Echo
    options:
      - First Echo
      - Second Echo
      - Another one
    initial: First Echo
    icon: mdi:music
  1. Put the input select you created in an entities card.
- type: entities
  entities:
    - input_select.selected_echo
  1. Create one conditional card for each echo you got, the conditions should be to check if the input select state matches the name of the echo. Put it inside the same entities card as the input select or anywhere you want.
# conditional card example (one for each echo)
type: conditional
conditions:
  - entity: input_select.selected_echo
    state: "First Echo"
card:
  - type: custom:mini-media-player
    entity: media_player.first_echo
    ...

No it doesn't work

Okay, nothing I can do then, sorry.

here a example script:

If that script works, you should be able to put this right in the mini-media-player card:

...
buttons:
  - icon: mdi:cat
    type: TUNEIN
    id: 1live 眉berall
  ...

Thank you very much ... this is really great and I can avoid the scripts

buttons:
  - icon: mdi:cat
    type: TUNEIN
    id: 1live 眉berall

But for my feature request .. would it not possible that you implement an option to chose the media player in your mini player card in one of the future releases?

But for my feature request .. would it not possible that you implement an option to chose the media player in your mini player card in one of the future releases?

Sorry, won't happen.
The input select + conditional cards route should be a sufficient solution.
Or if someone made a custom card that wraps other card(s) and provides this functionality, could be cool card.

What a pity ... I guess it would be a valid option ...

image

@kalkih your example of using the conditional card along with the input_select does in-fact work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jjlawren picture jjlawren  路  4Comments

magnusoverli picture magnusoverli  路  5Comments

hulkhaugen picture hulkhaugen  路  3Comments

bramkragten picture bramkragten  路  4Comments

gerard33 picture gerard33  路  3Comments