To handle the serious issue of increasing oil spill accidents, many strategies have been proposed to either clean spilt oil or separate water/oil mixture. Especially, superhydrophilic/underwater superoleophobic smart materials have recently shown advantages in overcoming problems of oil blocking and water barriers during conventional oil/water-separating process of oil-rich mixtures with superhydrophobic/superoleophilic materials. However, to the best of our knowledge, no prior reports have detailed smart materials with the wetting properties of superhydrophobic/superoleophilic that can be applied in continuous in situ separations of oil/water/oil ternary mixtures, which are common in practical oil spill cases. Herein, we describe the fabrication and efficacy of a pH-responsive smart device for continuous in situ separations of such oil/water/oil ternary mixtures without the need for ex situ treatments. In air, the superhydrophobic/superoleophilic surface of the device allowed dichloromethane to permeate through while preventing water from passing. The superhydrophilicity/underwater superoleophobicity of the device surface following alkaline treatments prevented the passage of hexane while allowing water to penetrate the device. Recent efforts to find quick and simple ways to remediate oil spills have focused on bio-inspired membranes that selectively filter either oil or water from a mixture. Real-world oil pollution, however, often contains complex, oil–water–oil emulsions that can clog single-purpose membranes. Now, a team led by Feng Shi from Beijing University of Chemical Technology in China has developed a pH-responsive ‘smart’ device that can separate three component oil–water mixtures on demand. Their device — a porous copper foam cube coated with silver aggregates and self-assembled organic films — initially absorbs oil while blocking water. Increasing the mixture's pH transforms the device wettability from superhydrophobic to superhydrophilic, meaning that only water can now be absorbed. Sequential pH changes enable efficient separation of tertiary oil spills without additional treatments. By fabricating a pH-responsive smart device with tunable surface-wetting properties, we have realized continuous in situ separations of oil/water/oil ternary mixtures without ex situ treatments of cleaning or drying. In air, the superhydrophobic/superoleophilic surface of the smart device allowed heavy oil to permeate through while preventing water from passing. When exposed to alkaline water, the superhydrophilicity/underwater superoleophobicity of the smart device surface prevented the passage of hexane while allowing water to penetrate. In this way, efficient separation and collection of the individual components of a complex oil/water/oil mixture was realized in a continuous process with no ex situ treatments. This method could provide a strategy for continuous separations of oil/water/oil ternary mixtures, which are common in practical oil spill cases.