Sorry, guys for taking so long to come back...with an update...
It turned out that the new sensor I bought was faulty, I returned it and got my money back.
I subsequently bought two used ones, from a trusted source of ST170 Spares, Jeremy at Moretonhampstead.
After different trials we isolated that the problem was with the O/S/F corner, sensor or bearing.
I did a continuety test on the cable, and all was was good, so it was the bearing.
Anyway I took the hub off and when trying to remove the flange we destroyed the new bearing, so as I bought a second hand hub we used it and all was well.
There are no lights on now.
Thanks for all the advice.