ERROR (MainThread) [homeassistant.core] Invalid service data for media_player.play_media: extra keys not allowed @ data['data']. Got {'media_content_id': '/local/test.mp3', 'media_content_type': 'music'}
required key not provided @ data['media_content_id']. Got None
required key not provided @ data['media_content_type']. Got None
This sets the output to audio jack and not the hdmi. Which fixed the actual problem.
Both your examples are correct by the way. @Gilganik yeah setting "/local/test.mp3" does not work, as you said "/home/pi/.homeassistant/www/test.mp3" has to be used.
but @Bob_NL you have to use media_content_type: 'music' otherwise it won’t work.
Anybody any idea what would be the media_content_id of a Google Play music playlist or the “I feel lucky” functionality? Or isn’t that possible because of the authentication?
For the aid of others reading this post later. I have had I problem with getting media_player.play_media to work. And I finally figured out that the media file name is case sensitive. So what you have here in the second example works: media_content_type: 'music'
but ensure the file path is correct including the Case.
Hi, i tries everything like you but i didn’t figure out the issue.
my script in scripts.yaml is
perdita_acqua_cucina:
alias: perdita acqua cucina notifica vocale
sequence:
- service: media_player.play_media
data:
entity_id: media_player.google_home_mini_sala
media_content_id: https://192.168.0.14:8123/local/config/www/Audio/Siren.mp3 #sftp://[email protected]/config/www/Audio/Siren.mp3 this is the path of the mp3 from #filezilla
media_content_type: 'music'
Really i tried everything, can you give me some advice?
Thanks