About 150 people had to be evacuated after a transformer within an electrical substation caught fire in west London.