Electro-optic level switches