Getting this error when triggering the automation.
[31m2018-01-25 00:28:59 ERROR (MainThread) [homeassistant.core] Invalid service data for media_player.media_play: extra keys not allowed @ data[‘media_content_id’]. Got ‘music.mp3’
extra keys not allowed @ data[‘media_content_type’]. Got 'music’e[0m
e[32m2018-01-25 00:28:59 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=103576496-18>e[0m
Here is the yaml.
alias: Front Door Motion Detection
id: '1516859458063'
trigger:
platform: state
entity_id: sensor.front_door_motion_detected
from: 'false'
to: 'true'
action:
service: media_player.media_play
data:
entity_id: media_player.living_room_speaker
media_content_id: 'http://192.168.1.26:8123/music/front_door.mp3'
media_content_type: 'music'
the format is wrong in this section according to your errror. As the other 2 guys said, you should paste your code with the correct format here by using the </> button in the text editor.
Thanks for the feedback. I formated the YAML in the original post above. Please refer and let me know if any issues. I am still getting the same error.
Hey. I did not understand. where am i making a mistake. This is written in my script. but the music does not play. What do I need to do for online broadcasting radio on google nest hub?
'1590793764379':
alias: Радио
sequence:
- data:
media entity_id: media_player.nest
media_content_id: https://nashe1.hostingradio.ru/nashe-256
media_content_type: audio/mp3
service: media_player.play
entity_id: media_player.nest
service: media_player.media_play
@sramnarayan Well, on a positive note: you just provided the solution for me. After I was banging my head for an hour why my automation was not working. So: thanks for your post!