Here is a tiny light switch with WiFi and Alexa support. It is compact enough to fit in various mounting boxes. It can be attached to door exit, SPDT, and other switches. It is powered by an ultra-fast ESP32 chip.
The MINIR4 is compatible with IFTTT. You can put it on a schedule and control it with voice commands.