From 7e705f732e26bc66026f27788eaa663ce4de1401 Mon Sep 17 00:00:00 2001 From: Sergio Oller Date: Thu, 7 Mar 2019 04:47:32 +0100 Subject: [PATCH] Support multiple keys in ifttt triggers (#8751) * Support multiple keys in ifttt triggers * Rename `to` to `target` in ifttt as suggested --- source/_components/ifttt.markdown | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/source/_components/ifttt.markdown b/source/_components/ifttt.markdown index 2c127fe08a1..691a561305d 100644 --- a/source/_components/ifttt.markdown +++ b/source/_components/ifttt.markdown @@ -70,6 +70,19 @@ Once you have added your key to your `configuration.yaml` file, restart your Hom After restarting the server, be sure to watch the console for any logging errors that show up in red, white or yellow.

+### {% linkable_title Multiple IFTTT keys %} + +If you have multiple IFTTT users you can specify multiple IFTTT keys with: + +```yaml +# Example configuration.yaml entry +ifttt: + key: + YOUR_KEY_NAME1: YOUR_API_KEY1 + YOUR_KEY_NAME2: YOUR_API_KEY2 +``` + + ### {% linkable_title Testing your trigger %} You can use the **Developer tools** to test your [Webhooks](https://ifttt.com/maker_webhooks) trigger. To do this, open the Home Assistant frontend, open the sidebar, click on the first icon in the developer tools. This should get you to the **Call Service** screen. Fill in the following values: @@ -85,6 +98,17 @@ Service Data | `{"event": "EventName", "value1": "Hello World"}` When your screen looks like this, click the 'call service' button.

+By default the trigger is sent to all the api keys from `configuration.yaml`. If you +want to send the trigger to a specific key use the `target` field: + +Field | Value +----- | ----- +domain | `ifttt` +service | `trigger` +Service Data | `{"event": "EventName", "value1": "Hello World", "target": "YOUR_KEY_NAME1"}` + +The `target` field can contain a single key name or a list of key names. + ### {% linkable_title Setting up a recipe %} Press the *New applet* button and search for *Webhooks*.