Respons of Xiaomi motion sensor

Hello,

My motions sensors (Xiaomi Aqara) are behaving strange.
I’ve got motion sensors to turn on the light when there is motion.
The light stays on for 2 minutes, when the light is turning off after the 2 minutes the light will not turn on when there is motion again, why not?
Why is this not working?

This is my automation:

### Motion: Verlichting wc aan indien beweging ###
- alias: Verlichting wc aan bij beweging
  trigger:
     platform: state
     entity_id: binary_sensor.presence_8
     to: 'on'
  condition:
    condition: and
    conditions:
    - condition: sun
      after: sunset
    - condition: state
      entity_id: switch.sonoff_1000d89116
      state: 'off'
  action:
    - service: input_boolean.turn_on
      entity_id: input_boolean.motion_detected_toilet
    - service: homeassistant.turn_on
      entity_id: switch.sonoff_1000d89116
- alias: Licht wc uit na 2 minuten geen beweging
  trigger:
    platform: state
    entity_id: binary_sensor.presence_8
    to: 'off'
    for:
      minutes: 2
  condition:
    condition: state
    entity_id: input_boolean.motion_detected_toilet
    state: 'on'
  action:
    - service: input_boolean.turn_off
      entity_id: input_boolean.motion_detected_toilet
    - service: homeassistant.turn_off
      entity_id: switch.sonoff_1000d89116

It’s for the toilet, i don’t like to sit in the dark when i’m focussed haha

Thanks!