They make two types. Light-sensing wall plugs which are always-on when dark, and motion-sensing battery operated which come on briefly when you move near them in dark. The latter is a good answer to your described problem plus it solves power outages where your UPS isn't powering the light. I don't have a need for the dark-sensing only the motion-sensing.
The stick-on only sticks-on once, use some external to the side tape initially temporarily to debug the sensor picks you up early before you pull off the supplied pad to expose the stickiness for permanent fititng. You can also use a screw fitting if surface isn't good for sticking. The stickiness is very good as it a lightweight unit. My next order to deliver is my 3rd so is total of 9 Eufy stick-on, I'm putting 2 in a bedroom hallway (the same problem you had, the desk lamp is distant from the door) and to fill out a garage dark spot.
I will experiment and learn from the new smart power switch i ordered, then judge if I can usefully use more of them, currently I can only think of one problem they solve. The old mechanical switches are so cheap they solve the repetitive timed on/off need.