Lovelace: Mini Media Player


#469

I think theres and issue with !include that requires a HA restart instead of the normal reload of the page.


#470

I’ve just updated to 0.84.2 and did a full reboot. It does not work. When I edit the file in the raw config editor I get the following error:

includeerror


#471

Not sure, the instructions were written before 0.84.0 came out and !include worked, not sure if they dropped support for it. That would be weird.

I’ll update to 0.84.0 later today and have a look.

Yes, that should work.
Can’t you add Spotify playlists as favourites in Sonos? That way you should be able to start them from the source menu.


#472

Yeah, and I’ve done that - however I want to make it super easy for my girlfriend to have a button that just says “Shower” or something and it will play a pre-defined list on the Sonos in the bathroom :slight_smile: But yes, there are work-arounds :slight_smile:


#473

It’s quite strange. I uses !includes for everything… automations, scripts, etc. but it doesn’t seem to work in this specific case :thinking:


#474

Ah, yes I see.
Yeah Spotify URIs are really convenient, it’s a pity they only work through the Spotify Component.

What about adding some Entity buttons that calls media_player.select_source to trigger the favourite playlist?


#475

Good idea - I’ll have a look at that. I tried your Sonos grouping now, and that also works great.
Adding the show source part, let’s you have a good view with grouping option enabled, and you can juggle playlists. As optimal as it gets currently I think :slight_smile:

Any further plans for the Sonos support on stuff you are planning to add?

Thanks for the help!

TJ


#476

Thanks, the Sonos group feature is still very new, so if you have any feedback or issues, please let me know.

No plans for any new features at the moment, but feature requests are always welcome.


#477

issue filed: https://github.com/home-assistant/home-assistant/issues/19292


#478

I see you’re a fan of !include :laughing:


#479

well, yes, I found a ui-lovelace.yaml file of over 4000 lines rather unmanageable…


#480

sorry if this is off topic here, but please let me know how you do that in Lovelace?
(I have a set of tiles, I like to use in more than 1 view, and thus like a way to !include that. Right now I have these views copy that code, which is a waste and not very manageable of course.)


#481

It’s a misunderstanding. I use includes in my configuration.yaml but i tried according to this tutorial https://github.com/kalkih/mini-media-player#sonos-group-joinunjoin. And so far include in lovelace-ui does not work when storage is the default action of handling ui-lovelace.


#482

Hmm, not sure I completely follow, but as an illustration:

In regular Ha we created a set of tiles in a dedicated file, and call that set eg group.activity_tiles

this group could be placed anywhere.

As I understand it now, the full set of yaml code needs to be placed in the places where I want this set of Tiles to be displayed…?

while I was looking for a way to !include activity_tiles.yaml (in which this set would be created) in any of the views I want the tiles to show up in.


#483

Also wanted just to come back and say AWESOME, This now works with Fire Tablets, and I am so happy. Thank you for excellent card and work here!


#484

That’s great!
Thank you for the kind words.


#485

Hey @kalkih this cards is really awesome. Thanks a lot!..

For some reason I cannot make the card to show the artwork.
I opened an issue describing the problem. https://github.com/kalkih/mini-media-player/issues/45


#486

Hi,

First off, thanks for this component, works like a charm. The only issue I have is with Alexa TTS. The “Alexa as media player” component works fine and I can send {“entity_id”: “media_player.kitchen_echo”, “message”: “zapit”} to my kitchen echo but no matter source I select in the drop down, I never hear anything from my echo’s.

Enabling debug logging shows that no matter what source I select, it’s always trying to output to media_player.spotify, which I don’t think will work. media_player.spotify is the entity ID that I have in my config.

2018-12-18 01:20:25 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140198944978872] Received {'type': 'call_service', 'domain': 'media_player', 'service': 'alexa_tts', 'service_data': {'message': 'zapit', 'entity_id': 'media_player.spotify'}, 'id': 20}
2018-12-18 01:20:25 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=media_player, service=alexa_tts, service_data=message=zapit, entity_id=media_player.spotify>
2018-12-18 01:20:25 DEBUG (MainThread) [homeassistant.components.api] STREAM 140199400771680 FORWARDING <Event call_service[L]: domain=media_player, service=alexa_tts, service_data=message=zapit, entity_id=media_player.spotify>
2018-12-18 01:20:25 DEBUG (MainThread) [homeassistant.components.api] STREAM 140199400771680 WRITING data: {"event_type": "call_service", "data": {"domain": "media_player", "service": "alexa_tts", "service_data": {"message": "zapit", "entity_id": "media_player.spotify"}}, "origin": "LOCAL", "time_fired": "2018-12-18T01:20:25.788652+00:00", "context": {"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx", "user_id": null}}
2018-12-18 01:20:25 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140198945881448] Sending {'id': 28, 'type': 'event', 'event': {'event_type': 'call_service', 'data': {'domain': 'media_player', 'service': 'alexa_tts', 'service_data': {'message': 'zapit', 'entity_id': 'media_player.spotify'}}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 12, 18, 1, 20, 25, 788652, tzinfo=<UTC>), 'context': {'id': 'xxxxxxxxxxxxxxxxxxxxxxxx', 'user_id': None}}}
2018-12-18 01:20:25 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140198944978872] Sending {'id': 20, 'type': 'result', 'success': True, 'result': None}

My config:

artwork: cover
artwork_border: true
entity: media_player.spotify
icon: 'mdi:spotify'
idle_view: true
media_buttons:
  - name: Simon's Playlist
    type: playlist
    url: 'spotify:user:xxx:playlist:1sQlinRFYVYT2txUOlVTHu'
  - name: Sarah's Playlist
    type: playlist
    url: 'spotify:user:xxx:playlist:5ilsrBtYkARYYtuNNmqQ1m'
  - name: Nanny's Playlist
    type: playlist
    url: 'spotify:user:xxx:playlist:4mWKj2kbbapnIj0ORh8W0q'
  - name: Bozeman-What is Love
    type: music
    url: 'spotify:track:2DOykLfhy5XEHxZeb3AaPA'
power_color: true
show_progress: true
show_shuffle: true
show_source: true
show_tts: alexa
type: 'custom:mini-media-player'

Any help would be appreciated.

Thanks

Simon


#487

Thanks! Let’s investigate this more over @ github.

Hey,
The Text To Speak will play on the entity of which card it’s sent from, media_player.spotify in your example.
Spotify doesn’t support TTS, so it doesn’t matter what source you select, it will never play.

If you want your echo to output the TTS message, you would have to send the TTS message from a card where the entity is the echo.

- entity: media_player.kitchen_echo
  type: custom:mini-media-player
  show_tts: alexa

#488

I’m building a remote control card for the Bravia tv Media component, I would like to figure out if there would be a way to integrate this card with the mini Media player