Yep - Same thing happened with me - was quoted a fix of £300 to "re flash the alarm" - but thanks to the guys on here, just replaced the bonnet sensor for £10ish off Ebay and was all sorted! Can just disconnect it in the meantime though - under the bonnet middle of the car under the windscreen where the two cross braces meet, the switch is there just unplug it
Youtube Vid from a 1 Series replacement so you can see what the switch looks like:
https://www.youtube.com/watch?v=RpFbQQQnvO4