I have faced a similar problem with an MQ2 gas sensor that implements a visual (LED) and acoustic (Buzzer) alarm when a gas leak is detected. The visual and sound alarms, that can work also in absence of the MySensors network, can be activated or deactivated with a physical button on the node or also in the controller with two dedicated switches (S_BINARY, V_STATUS).
The code is here.
One interesting option that you can consider is that if you define a constant at the beginning of your code like for example
and the you wrap all of your privacy related code inside an #ifdef statement
#ifdef PRIVACY_MODE sendWithPermission(); #endif #ifndef PRIVACY_MODE send(); #endif
the compiler will compile only the relevant part of the code, saving some space of your MCU memory.
This allows also you the easily disable and enable the functionality with a firmware flash.
You can also save the privacy state to EEPROM if you want to keep your setting across power cycle.