I suspect it was the connector loose (or the idc connection with the wire?), not the microswitch.
Makes sense as for a few weeks it would go on and off when moving the outside panel.
I thought it could've been a loose wire, but never got round to looking at it, until now.
cheers