Disable sensor or switch created with IFTTT

Hi,

I have successful created a switch with IFTTT maker channel.

URL: https://mydns:8123/api/states/switch.alarm_ausgeloest?api_password=xxxx

Body: {"state":"on", "attributes": {"friendly_name": "alarm_ausgeloest", "icon":"mdi:security"} }

If I trigger IFTTT, HA automatically generats a switch called switch.alarm_ausgeloest.
The status is “on”.

The problem is:
The state of this switch is ALWAYS ON. If I deactivate the switch in the UI manually, the switch automatically switched back on. This remains so until I restarted HA. Then the switch is gone and I can trigger IFTTT again.

The question is. How can I generated a switch or sensor that is not always on? I want to trigger an automation to flash lights when alarm is triggered.

Thx for helping

Ok I could solve this problem by creating a “dummy” switch with the pilight component.

- platform: pilight
  switches:
    alarm_ausgeloest:
      on_code:
        protocol: kaku_switch
        unit: 6
        id: 19608596
        'on': 1
      off_code:
        protocol: kaku_switch
        unit: 6
        id: 19608596
        'off': 1

This switch appears as a normal switch and I can send my IFTTT outputs to this switch. Then I use the switch to trigger an automation. Works fine.