IFTTT and switches

I have an IFTTT applet with webhooks service that turn on or off a light (sadly not supported by HA), IFTTT is integrated in HA and it works fine, tested with dev-service… now I would like a switch to turn that light from lovelace, this is the code I wrote in configuration.yaml:

# Trigger IFTTT
  - platform: template
    switches:
      ifttt_switch:
        value_template: "{% if is_state('sensor.ifttt_switch', 'on') %}on{% else %}off{% endif %}"
        turn_on:
          - service: ifttt.trigger
            data:
              event: lampada_studio_on
        turn_off:
          - service: ifttt.trigger
            data:
              event: lampada_studio_off

When I click on the switch the light turns on but the switch (the icon) immediatly change its state to off and I can’t turn off the light… if I call the service from dev-service it works fine so I think the problem is in the above code, maybe the value_template?

I think the problem is that using a switch, basically you are executing the service call and then it turns off, just like what will happen if you would call a script.
Maybe I would try to do the same but with an input boolean

I’ll try, thanks!

How did you ever resolve this. I use IFTTT for lights/switches all over my house. The HA interface is not the best as I use input_select, scripts and switches.