Re: 0.105.3 passing parameter to script from IFTTT not working

I have the following script:

fanspeed:
  sequence:
  - service: system_log.write
    data_template:
      level: info
      message: 'Setting fan speed to: ({{speed}})'

From within HomeAssistant Developer Tools SERVICES I can run the following:

Service:  script.fanspeed
Service Data (YAML, optional)
1 "speed": "off"
CALL SERVICE

In the log this produces:
[homeassistant.components.system_log.external] Setting fan speed to: (off)

From IFTTT I have the following:

URL: https://<mydomain>.com/api/webhook/<my token>
Method: POST
Content Type: application/json

For the “Body” I have tried all of the following:

{"action": "call_service",  "service": "script.fanspeed", "speed": "off" }
{"action": "call_service",  "service": "script.fanspeed",  { "speed": "off" }  }
{"action": "call_service",  "service": "script.fanspeed", "data": { "speed": "off"}  }
{"action": "call_service",  "service": "script.fanspeed", "variables": {"speed": "off" } }
{"action": "call_service",  "service": "script.fanspeed", "fields": {"speed": "off" } }

The first two result in the log message:
[homeassistant.components.system_log.external] Setting fan speed to: ()
The rest produce no message (i.e., the script is not called). That is, none of them work!

I am using google assistant to trigger IFTTT, which is working.

Please, can someone tell me what I am to put in the ifttt body field to get it to pass a parameter “speed” to my script?

Thanks!

P.S. I had it working before I upgraded (using the REST api and an api_password) as follows:

url: http://<my domain>.com/api/services/script/fanspeed?api_password=<password>
body: {"speed":"off"}

But I had to convert when I upgraded HA…

P.P.S.
For production I use {{TextField}} but for testing I an using the constant “off”.

Here is a good example that does the same…

Any guess then why mine doesn’t work (when it was working using the old method)?

Is it the “trigger.event.data.things” item that makes it work? So what should my simple script look like?

Tried several changes but none worked. I can’t see the mapping from the example you posted to my situation…

Does anyone have an example using a script (not an automation) where they pass a parameter from IFTTT using the new IFTTT integration? If not, I guess I will report this as a bug…

why not call an script from an automation ?

So you think it’s a bug?

no idea :slight_smile:

Thanks for the suggestion! I may resort to that if I don’t hear of a solution.

I just don’t understand how such a basic issue could be a problem only for me…