As I and others have said, my greatest concern relates to what other dangerous things may be going on in your installation and, with the best will in the world, I don't think you have the knowledge to be able to ascertain that - and your attempts to correct things could make things more dangerous, rather than less.Yes I thought that but I wasn't too sure. I will do some testing and find out what's where and then wire it up. Hopefully I can make it alright either that find a qualified electrician to sort it out.
We know that whoever wired the switch we have seen made at least one dangerous error - either switching the neutral instead of line/live or using blue as line/live and brown as neutral, either of which is dangerous. The same person who made one of those very basic mistakes may well have done other dangerous things elsewhere in your installation, which may well not be apparent to, or detectable by, you. I therefore can but repeat my advice that you really ought to get an electrician to check out everything, before you attempt to correct anything.
Kind Regards, John