Sensor and light automation

Good afternoon,
I have an aquara motion sensor and an ikea light in the hall.
What I would like to achieve initially, through automation is that … if the sensor detects movement for more than 2-3 seconds, the light will turn on. The reason is not another that sometimes is a place of passage and it is not necessary to turn on the light at first.

how I should proceed?

Thank you

- id: hall_light_motion
  alias: 'Hall Light Motion'
  trigger:
    platform: state
    entity_id: binary_sensor.your_hall_motion_sensor_here
    to: 'on'
    for:
      seconds: 3
  action:
    service: light.turn_on
    entity_id: light.your_hall_light_here

Thanks for the answer, but with this automation the light comes on after 3 seconds, when I have passed the entrance.
For you to understand me, it is a zone of passage, that I only want to turn on if I am in that room for a while, not in passing.

No it does not.

It comes on only if the sensor has been on for 3 seconds.

What is probably happening is that your motion sensor outputs a pulse longer than 3 seconds for each movement detected.

Ahhh it’s okay!
How can I modify the pulses of my sensor?
It’s a ZIgbee2mqtt sensor. Do I rework it in the zigbee configuration.yaml?

I am going to try

Thank’s Tom

I’m not familiar with that particular sensor sorry.

you cannot do what you want since aqara motion sensor reports as on for 60 seconds after activation