I created this PIR (Passive Infrared) outlet for the lamp by my door so I no longer have to flip the switch when I walk in with my hands full. I know you can buy wall switches with PIR in them but I haven’t seen an outlet yet.
I basically took a dual-gang electrical junction box, an outlet and a standard switch, I drilled a hole in the center of the cover plate and mounted the PIR sensor (Walmart special, $9, intended for a Brinks outdoor light). The PIR sensor takes hot and neutral and switches out hot when it’s triggered by a change in thermal trace. This switched hot was then wired into the outlet and whatever is plugged into it is obviously now switched. So, what’s the switch for you ask? It’s simply to override the PIR sensor and keep the light on when I’m sitting on the couch. It’s just wired in parallel into the outlet.