How does the water move into and out of the sensor?

The driving force behind this is the water vapor pressure. The water vapor pressure of the water in the oil is confronted by the water vapor pressure of the water in the sensor. Water is moved into and out of the sensor until the pressure equilibrium is reached. If the equilibrium is disturbed by adding water (increasing the water vapor pressure of the oil) or drying the oil (decreasing the water vapor pressure), water again starts to move into or out of the sensor.