mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 13:56:53 +00:00
Add webhook trigger docs (#6610)
This commit is contained in:
parent
3664d24f90
commit
6d1c5eda38
@ -126,6 +126,15 @@ The following tables show the available trigger data per platform.
|
||||
| `trigger.platform` | Hardcoded: `time`
|
||||
| `trigger.now` | DateTime object that triggered the time trigger.
|
||||
|
||||
### {% linkable_title webhook %}
|
||||
|
||||
| Template variable | Data |
|
||||
| ---- | ---- |
|
||||
| `trigger.platform` | Hardcoded: `webhook`
|
||||
| `trigger.webhook_id` | The webhook ID that was triggered.
|
||||
| `trigger.json` | The JSON data of the request (if it had a JSON content type).
|
||||
| `trigger.data` | The form data of the request (if it had a form data content type).
|
||||
|
||||
### {% linkable_title zone %}
|
||||
|
||||
| Template variable | Data |
|
||||
|
@ -193,6 +193,17 @@ automation 3:
|
||||
Remember that if you are using matching to include both `minutes` and `seconds`. Without `seconds`, your automation will trigger 60 times during the matching minute.
|
||||
</p>
|
||||
|
||||
### {% linkable_title Webhook trigger %}
|
||||
|
||||
Webhook triggers are triggered by web requests made to the webhook endpoint: `/api/webhook/<webhook_id>`. This endpoint does not require authentication besides knowing the webhook id. You can either send encoded form or JSON data, available in the template as either `trigger.json` or `trigger.data`.
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
trigger:
|
||||
platform: webhook
|
||||
webhook_id:
|
||||
```
|
||||
|
||||
### {% linkable_title Zone trigger %}
|
||||
|
||||
Zone triggers can trigger when an entity is entering or leaving the zone. For zone automation to work, you need to have setup a device tracker platform that supports reporting GPS coordinates. This includes [GPS Logger](/components/device_tracker.gpslogger/), the [OwnTracks platform](/components/device_tracker.owntracks/) and the [iCloud platform](/components/device_tracker.icloud/).
|
||||
|
Loading…
x
Reference in New Issue
Block a user