[V] I updated the card to the latest version available
[V] I cleared the cache of my browser
Describe the bug
When using this custom:button-card with call-service, service:media_player.play_media you cannot set metadata like in scripts
Version of the card
Version: v3.4.2
To Reproduce
This is the configuration I used:
name: GPR Dance
show_name: false
show_icon: true
type: custom:button-card
show_entity_picture: true
entity_picture: https://grandprixradio.nl/cache/GPR%20dance%20hits%20logo-5a0b070a.jpeg
size: 75px
tap_action:
action: call-service
service: media_player.play_media
service_data:
media_content_id: aac://https://22663.live.streamtheworld.com:443/GPRDANCEAAC.aac
media_content_type: music
entity_id: |
[[[
var player = states["input_select.radio"].state;
if ([player] == 'IT Room') return 'media_player.sonos_kantoor';
if ([player] == 'Huiskamer') return 'media_player.sonos_huiskamer';
]]]
code in script is:
- service: media_player.play_media
target:
entity_id: media_player.sonos_kantoor
data:
media_content_id: [FV:2/2](aac://https://22663.live.streamtheworld.com:443/GPRDANCEAAC.aac)
media_content_type: music
metadata:
title: Grand Prix Radio Dance Hits
thumbnail: >-
https://sali.sonos.radio/image?w=60&image=https%3A%2F%2Fcdn-profiles.tunein.com%2Fs211502%2Fimages%2Flogog.jpg%3Ft%3D1&partnerId=tunein
media_class: genre
children_media_class: null
navigateIds:
- {}
- media_content_type: favorites
media_content_id: ""
- media_content_type: favorites_folder
media_content_id: object.item.audioItem.audioBroadcast
Screenshots
with script:
With custom:button-card:
Expected behavior
With script, you have a background in the player. When using the custom:button-card note.
Also missing the title next to the device
Desktop (please complete the following information):
all
Smartphone (please complete the following information):
all
Additional context
As you miss the option to set the metadata you dont see in the player the title and background.
As with scripts you can see it, you know directly which music station you are listing to.
Checklist
Describe the bug When using this custom:button-card with call-service, service:media_player.play_media you cannot set metadata like in scripts
Version of the card Version: v3.4.2
To Reproduce This is the configuration I used:
code in script is:
Screenshots with script:
With custom:button-card:
Expected behavior With script, you have a background in the player. When using the custom:button-card note. Also missing the title next to the device
Desktop (please complete the following information): all
Smartphone (please complete the following information): all
Additional context As you miss the option to set the metadata you dont see in the player the title and background. As with scripts you can see it, you know directly which music station you are listing to.