From what the lads on the Z3 Coupe Forum which I'm a member of these items are NLA from BMW. Mine was giving erratic readings last year so when I had the wings and sill covers off for refurb I removed this sensor. I gave it a good clean up as it was heavily corroded and covered in crud, I also recut the thread so I could get a nut on it again. I cleaned up the contacts then refitted it, its been fine ever since.
Cost - Nil. Give it a try.
Failing that see if you can get second hand one of the guys on here.