Hello, this is a very basic question but I couldn’t seem to get it working.
I have a local file at www folder named “test.mp3” and trying to play this file from a media player, I used vlc and mpc.
action:
service: media_player.play_media
data:
entity_id: media_player.testsound
media_content_id: '/local/test.mp3'
media_content_type: 'audio/mp3'
I’ve also tried:
action:
service: media_player.play_media
data:
entity_id: media_player.testsound
media_content_id: '/local/test.mp3'
media_content_type: 'music'
I also tried the service with this code:
{ "data": {"media_content_id":"/local/test.mp3","media_content_type":"audio/mp3"} }
I keep getting the error:
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
Thank you