I get a green tick on yamel but it fails the “check configuration” with the following error
i have confirmed the entity and service on the developer tool tab, no sure where to look for the integration’data’ error .
just for context all I am trying to do is to play the siren .mp3 when movement is detected on a pir.
Component error: entity_id - Integration ‘entity_id’ not found.
Component error: service - Integration ‘service’ not found.
Component error: data - Integration ‘data’ not found.
Hi Michael,
your code is totaly out of context. Normaly it should be part of an automation.
Did you try to set it up via Configuration -> Automations?
Something like ‘when pir triggers motion then play music … on mediaplayer …’?
hi
yes it could be , that’s why i put some context in it, my thinking was try and get the audio working then setup the trigger and action, can you advice on the steps required, or what needs to be setup first in order to get the media player to play in the event of movement detection
thanks
Here’s a script from my system that is working, you should be able to adapt this to get yours working:
media_test:
alias: Media Test
sequence:
- service: media_player.play_media
data:
media_content_id: http://192.168.1.17:8123/local/doorbell-2.mp3
media_content_type: music
entity_id: media_player.study
mode: single
hi
i just read the link above , and now realize that i have been putting the above configuration in “configuration.yaml” but i see that it needs to be in automation .yaml.
now that is cleared up ill give that a go, just one other thing, with the above config is there a way to check if its working without the automation trigger , say by calling the service ?
under the service tab i selected " media_player.play_media" service and below i added
entity_id: media_player.soundtouch_living_room
media_content_id: ‘https://192.168.1.103:8123/local/siren.mp3’
media_content_type: music
i press call service, the colour of “call service” changes to green for a second but no sound from soundtouch.
i was at least expecting the soundtouch to power on
any ideas
cheers
working as required , and it turns the soundtouch media player on , but after playing the sound it does not turn it self off , that’s next on the list
cheers