HA payload fixed
This commit is contained in:
@@ -49,7 +49,7 @@ trigger_power_cycle() {
|
||||
local response=$(curl -s -w "\n%{http_code}" -X POST \
|
||||
-H "Authorization: Bearer $HA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"entity_id\": \"$entity\"}" \
|
||||
-d "{\"target\": {\"entity_id\": \"$entity\"}}" \
|
||||
"$HA_URL/api/services/switch/turn_off")
|
||||
|
||||
local http_code=$(echo "$response" | tail -n 1)
|
||||
@@ -70,7 +70,7 @@ trigger_power_cycle() {
|
||||
local response=$(curl -s -w "\n%{http_code}" -X POST \
|
||||
-H "Authorization: Bearer $HA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"entity_id\": \"$entity\"}" \
|
||||
-d "{\"target\": {\"entity_id\": \"$entity\"}}" \
|
||||
"$HA_URL/api/services/switch/turn_on")
|
||||
|
||||
local http_code=$(echo "$response" | tail -n 1)
|
||||
|
||||
Reference in New Issue
Block a user