State transition of a toggle switch