Driver: How to I create a driver for door lock that is opens and closes base on the door handle angle(+/- degrees)?
First you need to remove the Limit Location Constraint from your &quot;Bar&quot; object. This prevents it from moving along the Y axis.
Next select your handle, right click into the X rotation and select Copy As New Driver
Right click into the Y location of the &quot;Bar&quot; object and choose Paste Driver. Right click again and choose Edit Driver. Set the Evaluation to Scripted Expression and change it to (abs(degrees(rot))-45)*0.0002-8.626. (Might need to change it if you want exact values). It should look like this :

No need to tweak the F-curve properties unless you want a special interpolation.
Result :