Implement ON/OFF callbacks.