Dear community,
I’m working on getting my home assisant work with curl-scripts. I want to POST a JSON-string where I can turn my light on. I use the following line in a bash file:
curl -X POST -H "Authorization: Bearer ABCDEF" -H "content-type: application/json" -d " {\"state\": \"on\"}" http://xxx.xxx.xxx.xxx:8123/api/states/switch.light_tl
In the home assisstant you can actually see the script is working (the slider turns on) but when I execute the script the light won’t turn on. Is there something wrong with my curl command?
Thanks for the help in advance,