This is the script I have and it works perfectly. I didn’t need to whitelist anything.
- service: media_player.play_media
target:
entity_id: media_player.speaker
data:
media_content_id: '/media/local/file.mp3'
media_content_type: audio/mp3
I had “music” as the media_content_type at first, but it wasn’t working with my setup. I found out using audio/mp3 has no issue.