mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Adding notes on JSON content-type header (#17902)
I noticed that the `trigger.json` key wasn't accessible unless I explicitly set the `Content-Type` header, so adding my discoveries to the documentation. Let me know if anything needs to be tweaked!
This commit is contained in:
parent
df2e339aad
commit
f28203fec7
@ -653,6 +653,12 @@ Webhook endpoints don't require authentication, other than knowing a valid webho
|
||||
|
||||
Note that a given webhook can only be used in one automation at a time. That is, only one automation trigger can use a specific webhook ID.
|
||||
|
||||
In order to reference `trigger.json`, the `Content-Type` header must be specified with a value of `application/json`, e.g.:
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Content-Type: application/json" https://your-home-assistant:8123/api/webhook/some_hook_id
|
||||
```
|
||||
|
||||
## Zone trigger
|
||||
|
||||
Zone trigger fires when an entity is entering or leaving the zone. The entity can be either a person, or a device_tracker. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. This includes [GPS Logger](/integrations/gpslogger/), the [OwnTracks platform](/integrations/owntracks/) and the [iCloud platform](/integrations/icloud/).
|
||||
|
Loading…
x
Reference in New Issue
Block a user