A sensor would have a L N and a L out to the light so you should have seen three wires, not just black and red and earth. Shame there is no pics. The light you were working on, just to be clear, there was only four wires going in to it? Not eight wires, i.e. looping to the next fitting in line???