How to use motion relay trigger on i3 to trigger multiple Shelly 1 lights?

  • I need help with a scene.

    When my security motion detector sends a signal to a Shelly i3. I want a specific light connected to a Shelly 1 to turn on if not already on, and then turn back off after 5 minutes. During the 5 minute timer, if another motion signal is sent, I want to reset the off timer to always turn off after 5 minutes after the LAST motion trigger.

    What do I set for Condition type (one time, repeatedly or on any change)? Currently any new motion triggers are ignored once the scene is triggered the first time and it shuts off after 5 min even if a new motion signal is sent. I only want to execute the scene this if the light is off. I don't want to trigger the 5 min off timer if the light was manually turned on from the wall switch. If I add a condition for the relay being off, it keeps turning on again if I manually turn if off from the app.