I don't want a button, I want a physical switch with two positions in a place where I am not likely to switch it accidentally.
And when I switch it, it should turn on or off fast enough close to instantly: this should not be a high-cost operation which requires a UX mitigation.
If I toggle a light switch accidentally, I'm not concerned about it, because it's so easy and fast to correct my mistake.
In other cases its usually to double dip on input components.