Help about use of IFTTT triggers with timing

Hi, I have created two applets that turn on and off my Sonoff Touch switch in IFTTT via eWeLink service, they names are “Sonoff_on” and “Sonoff_off”.
The first one switch on lights when somebody open the door… but I wish that the second one that switch off the lights will run 10 minutes after the first.
The second code was probably wrong… can someone help me?

automation:
  - alias: sonoff on
    trigger:
      - platform: state
        entity_id: binary_sensor.door_window_sensor
        from: 'off'
        to: 'on'
    action:
      service: ifttt.trigger
      data: {"event":"Sonoff_on"}

  - alias: sonoff off
    trigger:
      - platform: state
        entity_id: binary_sensor.door_window_sensor
        from: 'on'
        to: 'off'
        for:
          minutes: 10
    action:
      service: ifttt.trigger
      data: {"event":"Sonoff_off"}

Solved myself…

  - alias: sonoff off
    trigger:
      - platform: state
        entity_id: binary_sensor.motion_sensor
        to: 'off'
        for:
          minutes: 10
    action:
      service: ifttt.trigger
      data: {"event":"Sonoff_off"}