Change scripts states get & post
This commit is contained in:
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
|
|
||||||
payload=`echo $2 | base64 -d`
|
payload=`echo $2 | base64 -d`
|
||||||
echo -en $payload | curl -s --data-binary @- -X POST -H "Authorization: Bearer ${SUPERVISOR_TOKEN}" -H "Content-Type: application/json" http://supervisor/core/api/states/$1
|
echo -en $payload | curl -s --data-binary @- -X POST -H "Authorization: Bearer ${HASS_TOKEN}" -H "Content-Type: application/json" http://${HASS_HOST}/api/states/$1
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
|
|
||||||
curl -o states.json -s -X GET -H "Authorization: Bearer ${SUPERVISOR_TOKEN}" -H "Content-Type: application/json" http://supervisor/core/api/states
|
curl -o states.json -s -X GET -H "Authorization: Bearer ${HASS_TOKEN}" -H "Content-Type: application/json" http://${HASS_HOST}/api/states
|
||||||
|
|||||||
Reference in New Issue
Block a user