They use a buoyant float to gauge a fluid level. In most models, the float carries permanent magnets and encircles a stationary stem. As the float rises or drops with fluid level, the magnetic field ...
A few months ago, I wrote about a very popular cable float switch for another site (https://www.codrey.com/electronics/cable-float-level-sensor-switch-first-look ...