Add switching state callbacks