In my E-bike, sensor wires has come out from the left side brake lever. Please see attached photo from link below. How do I re-connect wires to sensor. How do I get access to sensor terminals? Do I have to buy a new brake lever with sensor cable attached? Please advise.
Based on the photo, there's a small knurled plastic ring around the cable. Try unthreading that and the switch should come out.
Then you'll need to strip the wires and solder to the switch, and provide mechanical support using heatshrink etc.
When you refit the switch, make sure the wires are not being pulled. I'd suggest adding more zip-ties to hold the wires to the brake cable for support.
Do take progress photos and add them as an answer of your own. If you feel this is beyond you, anyone handy and competent with electrics/wiring should be okay to do this.
The purpose of this sensor is to cut off the motor if you start braking. If you're comfortable with letting off the throttle, or coasting to brake, then the motor should shut off any assistance.
The sensor switch is probably a "normally closed" and will open when you press the brake lever. So to get the bike working temporarily you could bare and twist the two wires together.
Your last resort is to buy a new left-hand brake lever with a sensor. Also, check the right-hand lever and make sure the wire is not under strain now.