Having taken the fitting off, I can see how I wired it previously.
There are bunch connectors for the live, neutral, switched live and earth, with the switched live and neutral going to the sonoff inline switch.
I have an extra cable as this fitting is connected to three others operated by...