Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95377

Help with curl escape square brackets

$
0
0

@drimpart wrote:

Hey!

I´m using this curl command to send TTS notifications with a variable from my Mac Computer to Home Assistant:

curl -X POST -H "Authorization: Bearer MYTOKEN" -H "Content-Type: application/json" -d "{ \"entity_id\": \"media_player.schlafzimmer\", \"message\": \"test\" }" http://192.168.178.XX:8123/api/services/tts/google_say

and that works fine! Now I want to send TTS notifications from my mac to Alexa media Player, the service calls are a bit different, here is what I have so far:

curl -X POST -H "Authorization: Bearer MYTOKEN" -H "Content-Type: application/json" -d "{ \"target\": \"media_player.schlafzimmer_dot\", \"message\": \"test\", \"data\": \"type:tts\" }" http://192.168.178.XX:8123/api/services/notify/alexa_media_schlafzimmer_dot

But this is not working, I think its "data":{"type":"tts"}, I don´t know how to escape the second square brackets… Can anybody help?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95377

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>