Google Home, IFTTT, webhooks and ingredents

Hi All,

I have setup typical webhooks in IFTTT talking with home assistant from Google home.

I then thought I should setup a more complex command with ingredients to allow for a more universal config.

So I setup IFTTT to take a command like toggle $, allowing me to trigger any switch in my house, but when it comes to sending the $ or textfield ingredient in the webhooks end point it never seems to work.

I know this is more of a IFTTT/webhooks question, but the issue is getting the text ingredient in the middle of the JSON payload being posted to HASS.

I need to be able to send in entity_id: light.{{text_field}}, instead of a specific switch where $ represents the inbound command ingredient and {{text_field}} is where is comes out in webhooks.

Has anyone done this ? I dont want to have a too set up individual ifttt triggers for every light in my house.

Is there another way to expose my HASS to allow for this more generic way of doing things ??

Thanks

I haven’t done this (or tried to) but I did do it the ‘long way’ and set individual scenes, scripts up etc. with IFTTT in the past.

But I’ve now started setting up the Google Assistant component for Home Assistant, and (once setup) it is easier/simpler to add new lights, scenes, scripts etc. I’m basically adding ‘google_assistant: true’ to the things I want exposed. They also execute quicker than IFTTT.

Have you looked at the Google Assistant component?

I havent but I will look into it, I like the way I can trigger events with any command using IFTTT but if this is the more “correct” way to integrate with Google home Ill look into it… I have read that some people have security concerns around it…

and they don’t about IFTTT??

This is a little old, but answering in case it helps any one else …

You can do this, just use {{TextField}} in your JSON
in IFTTT:
use a trigger phrase with a text ingedient using the $ in place of the script name
then in the URL field use : https://mydomain.duckdns.org:8123/api/services/script/turn_on?api_password=mypassword
and then in the body field use : {“entity_id”:“script.{{TextField}}”}