Motion sensor return to previous state

Hi,

I wonder if anyone can help. I have my hue motion sensor set up as in the screenshots below.

The lights come on as expected but instead of them returning to their previous state they turn off when no motion is detected. Am I doing something wrong?

Any help appreciated.

Forgot to mention I have tried deleting all the rules and re-adding them.

You mentioned that your lights switch off when no motion was detected. That would happen if the lights were off before they were switched on by the motion sensor. Were your lights on or off before the motion sensor detected motion?