Keep sensor state on for a bit longer

Hi, I have a motion sensor that accurately detects motion. I’d like to trigger an automation only if there has beeen no motion for the past 10 minutes as a condition. Was thinking about adding a template sensor “persistant motion” that stays on for 10min everytime the motion sensor fires. How would I do that?

No need for a template sensor. Use a trigger like this:

trigger:
  - platform: state
    entity_id: binary_sensor.motion
    from: 'on'
    to: 'off'
    for:
      minutes: 10
action: etc...