Piston-sensing pressure switch