Need help. The hose coming out from power steering pump has different size than the one previously attached. See picture 1.
Picture 1.

The yellow is the one that came with the new engine, whereas the red one is the original hose. The mechanic is suggesting that the metal pipe be cut and simply the "plug" at the end be replaced (that connects to steering pump).
Now the other side of the hose (yellow one) that came with the engine can be seen in picture below.

Please see the sensor in the red circle. This is the other end of the power steering hose pipe that came with new engine.
What does this sensor do? Is this required? If the pipe is simply cut and old hose with new connector is used, then this hose with sensor will have to be taken off.
Please confirm. I hope I have explained properly.
Thanks.