diff --git a/source/_components/ifttt.markdown b/source/_components/ifttt.markdown index 9f48303946c..511390b52a5 100644 --- a/source/_components/ifttt.markdown +++ b/source/_components/ifttt.markdown @@ -13,7 +13,37 @@ featured: true ha_iot_class: "Cloud Push" --- -[IFTTT](https://ifttt.com) is a web service that allows users to create chains of simple conditional statements, so called "Applets". With the IFTTT component you can trigger applets through the **"Webhooks"** service (which was previously the **"Maker"** channel). See the [announcement blog post](/blog/2015/09/13/home-assistant-meets-ifttt/) for examples how to use it. +[IFTTT](https://ifttt.com) is a web service that allows users to create chains of simple conditional statements, so-called "Applets". With the IFTTT component, you can trigger applets through the **"Webhooks"** service (which was previously the **"Maker"** channel). + +## {% linkable_title Sending events from IFTTT to Home Assistant %} + +To be able to receive events from IFTTT, your Home Assistant instance needs to be accessible from the web ([Hass.io instructions](/addons/duckdns/)) and you need to have the `base_url` configured for the HTTP component ([docs](https://www.home-assistant.io/components/http/#base_url)). + +To set it up, go to the integrations page in the configuration screen and find IFTTT. Click on configure. Follow the instructions on the screen to configure IFTTT. + +Events coming in from IFTTT will be available as events in Home Assistant and are fired as `ifttt_webhook_received`. The data specified in IFTTT will be available as the event data. You can use this event to trigger automations. + +For example, set the body of the IFTTT webhook to: + +```json +{ "action": "call_service", "service": "light.turn_on", "entity_id": "light.living_room" } +``` + +You can then consume that information with the following automation: + +```yaml +automation: + trigger: + event: ifttt_webhook_received + event_data: + action: call_service + action: + service_template: '{% raw %}{{ trigger.event.data.service }}{% endraw %}' + data_template: + entity_id: '{% raw %}{{ trigger.event.data.entity_id }}{% endraw %}' +``` + +## {% linkable_title Sending events to IFTTT %} ```yaml # Example configuration.yaml entry @@ -107,16 +137,6 @@ ifttt_notify: ``` {% endraw %} -### {% linkable_title Sending events from IFTTT to Home Assistant %} - -To be able to receive events from IFTTT, your Home Assistant instance needs to be accessible from the web. This can be achieved by forwarding port 8123 from your router to the device running Home Assistant. If your ISP is giving you a new IP address from time to time, consider using [DuckDNS](https://duckdns.org). - -In the URL field, you can then put an [API URL](/developers/rest_api/). You probably want to use a POST action, so select `POST` as method. After your request line, you need to add your Home Assistant password, which you defined in the [http section of your config](/getting-started/basic/#password-protecting-the-web-interface), in the form of `?api_password=YOUR_PASSWORD`. For the message body, refer to the API page linked above. - -

- -

- ### {% linkable_title Additional Channel Examples %} Additional examples of using IFTTT channels can be found below. diff --git a/source/images/components/ifttt/IFTTT_to_HA.png b/source/images/components/ifttt/IFTTT_to_HA.png deleted file mode 100644 index 53a7573ec4c..00000000000 Binary files a/source/images/components/ifttt/IFTTT_to_HA.png and /dev/null differ