Expiration setting with NEO pir motion sensor not working

I have an issue with setting up expiration setting for NEO PIR motion sensor. I want to turn on a light and keep it on while motion is detected. If there is no motion anymore the light should turn off after 30 seconds. What hapens now is that the the light turns off after 30 seconds even if motion is detected in the mean time and additionally the light is not turned on again for the next 30 seconds. Below I have written the configuration. Has anyone experiance with this or can provide a sample to reached the wanted goal.

Things

  • Neo Coolcam PIR motion sensor (PD03Z)
  • NEO Wall Plug

Items

  • LS = Light switch
  • MS =Motion sensor
  • MLC = Motion light control - Expiration timer -> Update state = OFF

Triggers

  • LightControlOnMotion → if MS = ON then send command ON to MLC
  • LightOnOnMotion → if MLC update to ON then send command ON to LS
  • LightOffOnMotion → if MLC update to OFF then send command OFF to LS

I have a few of those cheap sensors and find them undependable.
Please post your Items & rules using code fences. We only help you develop solutions. we do not provide them.

How to use code fences - Tutorials & Examples - openHAB Community

Thanks for the aswer. I wasn’t able to find an option to provide code for the items as the setup was done in the graphical interface. I can provide the rest if that is usefull.