Turn on Light & Exhaust Fan but keep Fan on for 10 minutes after last motion

Hello All,
I’m trying to setup an automation using triggerIDs where once motion is detected to turn on the light and fan, but keep the fan on for 10 minutes after the last motion is detected. I’ve been testing with the configuration below, but both light and fan turn off after 5 minutes after no motion is detected. What am I doing?
Thanks for the help

  alias: First Floor Bathroom Light & Fan Automation
  description: Turn on Bathroom Light and Exhust Fan if Motion is detected, but keep
    Fan on for 10 minutes
  trigger:
  - type: motion
    platform: device
    device_id: 36c290c36f284f0fe6201b8e79c61430
    entity_id: binary_sensor.first_floor_bathroom_sensor_occupancy
    domain: binary_sensor
    id: motion-detected
  - type: no_motion
    platform: device
    device_id: 36c290c36f284f0fe6201b8e79c61430
    entity_id: binary_sensor.first_floor_bathroom_sensor_occupancy
    domain: binary_sensor
    for:
      hours: 0
      minutes: 5
      seconds: 0
  condition: []
  action:
  - if:
    - condition: trigger
      id: motion-detected
    then:
    - type: turn_on
      device_id: ab0c77bdbd5e53c0c72a5816580a4ffe
      entity_id: switch.first_floor_bathroom_main_lights
      domain: switch
    else:
    - type: turn_off
      device_id: ab0c77bdbd5e53c0c72a5816580a4ffe
      entity_id: switch.first_floor_bathroom_main_lights
      domain: switch
    alias: Turn on Lights if Motion is triggered, then turn off
  - if:
    - condition: trigger
      id: motion-detected
    then:
    - type: turn_on
      device_id: b122394850e646a0fe1ade8dd0a0982e
      entity_id: switch.first_floor_bathroom_exhaust_fan
      domain: switch
    else:
    - type: turn_off
      device_id: b122394850e646a0fe1ade8dd0a0982e
      entity_id: switch.first_floor_bathroom_exhaust_fan
      domain: switch
    - delay:
        hours: 0
        minutes: 10
        seconds: 0
        milliseconds: 0
    alias: Turn on Exhaust fan and wait 10 minutes before turning off
  mode: single