Help with motion detection lights with specific conditions

Hi,
I’m sorry if this has already been covered but I would like to do the following:
When the motion sensor detects motion between 11pm and 6am, it must switch on a light.

However, during this specific time period, if no motion is detected for 2 minutes after the light is triggered, then the light must turn off.

Below is the yaml code from the UI, I am stuck as to where and what to put as the duration period of 2 mins.

description: ''
mode: single
trigger:
  - type: motion
    platform: device
    device_id: d46b6e60d0ba142373a11451f1fff77b
    entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_b0a1c407_ias_zone
    domain: binary_sensor
condition:
  - condition: time
    before: '06:00:00'
    after: '23:00:00'
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
action:
  - service: light.turn_on
    data: {}
    target:
      device_id: 53b884ad23f8810104a21ba39a419bd4 ```

Use the ‘Choose’ in the Actions?