For a switch, it would be nice to have two confirmations, one for each state direction and the option to omit a state direction confirmation. For example, confirm switching off but not for switching on.
Then think about adding confirmation when there is an external condition. For example if someone is detected in the space, then confirm the switch operation.
The whole confirmation idea ought to be thought out and apply at any action. Confirmation should encompass an optional security option, like additional an additional security option that might be mild or hardened.