Had this on my old E85 and it was the under bonnet alarm switch.
IIRC if you double click the lock button on your key it will disable the Alarm. Might be handy until you get it fixed.
Mine kept doing it at work...it became a bit of a running joke and gave the bosses another reason to take the mick out of the Z (only jealous). I just removed the sensor as mentioned above and gave it a good clean etc and all has been fine since.
I should have electrical cleaner still floating about. Will give it a clean and with some luck be good. If not I'll just disconnect until I order the part
Had this on my old E85 and it was the under bonnet alarm switch.
IIRC if you double click the lock button on your key it will disable the Alarm. Might be handy until you get it fixed.
Double clicking the lock key disables the interior and tilt sensors, not the perimeter alarm, so the bonnet switch isn't excluded. Mine did this, stripped the switch and cleaned it, been fine since.
Just an update, disconnected the sensor and all is well. Im going to strip down and see if it can be fixed, if not then I'll just go without the sensor full stop