I have the following three curl commands working:
curl -s -X POST -H "Content-Type: application/json" -d '{"entity_id":"media_player.receiver"}' firewall:8123/api/services/media_player/turn_on
curl -s -X POST -H "Content-Type: application/json" -d '{"entity_id":"media_player.receiver", "source" :"game1"}' firewall:8123/api/services/media_player/select_source
curl -s -X POST -H "Content-Type: application/json" -d '{"entity_id":"media_player.receiver", "volume_level" :"0.7"}' firewall:8123/api/services/media_player/volume_set
I would like to be able to cause all three service calls to be run at once via a single curl shell command line call.
I suspect there is a way to set up an action or trigger (or whatever the correct word is) in my configuration.yaml file, then use it in a curl command to get all three services executed at once.
Can anyone provide me:
. a snippet to add to my configuration to do this
. the curl shell command to activate it
I have searched, but haven’t found the answer…
Thanks!