A dc current through a simple resistor could drive a meter, and the mechanism might be entirely out of the water except the float. You can't generalize and state any sensor would do what you are saying. It takes two electrodes, separated, and the ability to conduct between them through the water to power the breakdown of water. Done in the same tank if it occured, it might just rejoin into water rather than stay gasses, too. Current through the sensor probably would not create the conditions to produce electrolosis.