mini-media-player icon indicating copy to clipboard operation
mini-media-player copied to clipboard

Help with shortcut button and service

Open snorrebot opened this issue 1 year ago • 1 comments

Hi all,

I am desperately looking for a solution. I want to use a shortcut button on my mini media player to run the media_player.play_media service to play a radio station url. What am I doing wrong? I get the following error: cannot run service media_player/play_media. Must contain at least one of entity_id, device_id, area_id

Thanks a lot for helping me out! Lovelace card yaml:

type: vertical-stack cards:

  • type: custom:mini-media-player entity: media_player.keuken source: icon info: short artwork: cover hide: icon: true name: Keuken shortcuts: columns: 3 buttons: - name: Klara entity_id: media_player.keuken type: service id: media_player.play_media data: media_content_type: music media_content_id: http://icecast.vrtcdn.be/klara-high.mp3

snorrebot avatar Jul 05 '23 21:07 snorrebot

Found it: under data you have to type once again the entity_id: media_player.keuken

snorrebot avatar Jul 05 '23 21:07 snorrebot