I've always had occasional times when the alarm goes off for no apparent reason. I've also had occasional times when the 'bonnet open' warning comes up on the dash.
I understand it is quite common for this to cause the alarm to go off.
This week, it has been going off 10-15 times per day & night - very annoying.
I've ordered a new assembly (can't just buy the switch/sensor).
But - I have sorted a temporary fix - if you remove the connector from the switch and just bridge the 2 terminals in the socket with a piece of wire - hey presto - no more alarm going off!
I'm quite pleased with myself - though it might help others in the same situation