piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily
Apache License 2.0
3.52k stars 329 forks source link

[Feature]: Media card button to launch media browser directly in a pop-up #436

Open sveinnde opened 2 years ago

sveinnde commented 2 years ago

Is your feature request related to a problem?

In relation to the new media card: Navigating to the media browser seems only possible by having the tap action navigating to "More Info" and then tapping "Browse Media" and then selecting the source such as Spotify.

Describe the solution you'd like

Having the option to tap on the card itself or a button on the card and having the media dialog pop up directly would be nice, preferably to a chosen source such as an Spotify account if possible.

Describe alternatives you've considered

A proposed solution I found online and tried without success:

tap_action: action: fire-dom-event browser_mod: command: popup title: Media Browser hide_header: false large: false card: type: iframe url: /media-browser aspect_ratio: 200%

Additional context

No response

erik-bjork commented 2 years ago

Agreed, this would be a great enhancement

mattkerrison commented 2 years ago

+1 trying to get this too, assume it's a navigation call but not sure what the path is to get to it, would love to skip 'Browse Media' -> 'Spotify' or have the option to go one level deeper by going straight to 'Playlists'

uvjim commented 2 years ago

I'd love this too. I can use the following as a tap_action, but as the service name suggests it navigates away to the media browser rather than having a pop-up.

type: custom:mushroom-media-player-card
entity: media_player.living_room_tivo
media_controls:
  - on_off
  - play_pause_stop
collapsible_controls: true
tap_action:
  action: navigate
  navigation_path: /media-browser/media_player.living_room_tivo
hold_action:
  action: none
double_tap_action:
  action: none
use_media_info: true
icon_type: none
show_volume_level: false
card_mod:
  style: |
    ha-card {
      {% if not is_state("media_player.living_room_tivo", "off") %}
        background-blend-mode: overlay;
        background-color: rgba(var(--rgb-card-background-color), 0.5);
        background-image: url('{{ state_attr("media_player.living_room_tivo", "entity_picture") }}');
        background-position: right var(--spacing) top var(--spacing);
        background-repeat: no-repeat;
        transition: unset;
      {% endif %}
    }

image

image

ciedema commented 2 years ago

I'd like to see this also - something similar to browse media button on the standard media card (which renders quite nicely with the Mushroom Square theme) or a tap action.

image