Detection problem

Good evening @l.dolle
Wouldn’t it be a millimetre sensor? Because yes, these sensors go through walls. I had a lamp with a millimetre sensor built into the toilet with the door closed and as soon as someone passed in the hallway, the light would turn on.
I use Xiaomi RTCGQ01LM sensors without light-level detection (this one)
and the other one that has light-level detection is the Xiaomi RTCGQ11LM — they look very similar. And it works very well.
For the other problem, maybe Gladys kept the last state it saw, i.e. presence, and didn’t react to the power cut to switch back to the no-presence state, worth testing.
Oh yes, there is an issue: this Xiaomi sensor, once it has detected, stays blind for one minute. @pierre-gilles made a video (here) to handle this sensor, that might help you