There is a type of bulb in the market nowadays that detects load-shedding! I mean it keeps lighting after load-shedding. But my curiosity is if I turn off the switch of the bulb, it might have detected that load-shedding has occurred, but it doesn't! How does exactly it detects electricity outage! I want to know the electrical working behind it.
[EDITED]
Here is a video of that product (not exactly mine, but similar) https://www.youtube.com/watch?v=T9yfgc3FpW8
I'm from Bangladesh, yep here load-shedding means turning off in a grid for a short period of time.
My Building has no special electrical connection.