Easy there! By turning on/off I am talking about a light switch.
Understood.
The prohibition is not 'flicking the switch'. A switch that is not attached to anything would be OK.
Flicking the switch will cause you to do a different prohibition, namely ignigting fire/building a circut, or the reverse.
Covering a lamp, closing a door or curtain does nothing remotely that is prohibited.