I am struggling to update my zone location using a webhook; could someone help me figure this out ?
this is for an RV so my HOME is changing all the time
here is an example of webhook:
JSON_DATA='{
"latitude": redacted,
"longitude": 2.3522
}'
# Send the JSON data to the GPS API
curl -X POST \
-k -H "Content-Type: application/json" \
--data "$JSON_DATA" \
https://ha.lan:8123/api/webhook/gps
and my automation:
alias: Update Zone from GPS
triggers:
- webhook_id: gps
trigger: webhook
allowed_methods:
- POST
- PUT
local_only: true
actions:
- data:
dev_id: router
gps:
- "{{ trigger.json.latitude }}"
- "{{ trigger.json.longitude }}"
action: homeassistant.set_location