It must work with Xiaomi multifunctional gateway (CA1001) together. Timed and App control function. Open the door, the light will automatically on (uses with Xiaomi Mihome window door sensor). Easy upgrade by replacing old switch with Aqara smart wall switch (Zigbee version). One switch ony work with one corresponding light. But it can control all light after you change all switches.