Hi, I am just a user. I can describe my set-up it this helps.
By default Yeelight bulbs can be controlled in two ways:
- In Yeelight app through Internet, i. e. App → Yeelight Server → Router → Bulb
- Locally via JSON API, i. e. Program → Router → Bulb
- Dumb wall switch to cut power from bulb, physically (I won't recommend)
- Smart-dumb wall switch to cut power from bulb, remotely (I won't recommend)
- Smart 'virtual' wall switch to turn bulb programatically, remotely (I recommend)
When you cut power form bulb, it gets offline. It is impossible to remotely turn it on again.
With 'virtual' switch bulb is only pretending to be off. It stays always accessible through an API.
With case 1 and 2 above it is possible. With case 3 it is impossible.
I bought 3 smart bulbs and control them with virtual switch. More expensive, but gives much more possibilities.
If you want to use 'Xiaomi Aqara Switches' that I mentioned above, you have to buy Xiaomi gateway and use 'Mi Home' app.
Signal goes like this: Switch (Zigbee) → Mi Hub (Zigbee&WiFi) → Router (WiFi) → Yeelight Server (Internet) → Router (WiFi) → Bulb (WiFi)
If you care about privacy, it is possible to control Xiaomi Gateway and Yeelight Bulbs fully locally, using free software programs like Home Assistant with JSON API.
In this case, signal will go like this: Switch (Zigbee) → Mi Hub (Zigbee&WiFi) → Router (WiFi) → Computer With HomeAssistant (Local Network) → Router (WiFi) → Bulb (WiFi)
Yes, in Yeelight it is called 'Developer Mode'. API docs here: https://www.yeelight.com/en_US/developer
In Xiaomi Gateway it is called 'LAN Control' and can be enabled in app.
Xiaomi ZigBee gateway and switches can be bought separately for example on AliExpress.
When you use virtual ZigBee switch, your lights will fade-in and -out nicely. You can also custom program switches to control brightness, colour temperature, etc…