A gallium based switch or sensor devices, and a process for producing such devices, in which gallium or a gallium alloy, the surface oxide is separated either in-situ or ex-situ and placed in a switching capsule. A TE mode emitted from an optical waveguide section 3 transmits through a beam splitter 5 and is guided to a measurement optical path. The problem of rocker wear in prior-art devices caused by abrasive action of the bows is rectified by a redesign of the rocker and the manufacture of a wear-resistant insert that snaps into place at the rear of the rocker.