Four fire engines and around 25 firefighters tackled a fire at a house converted into flats on Maldon Road in Acton.
Half of a ground-floor flat was damaged by fire. A man and a child left the flat before firefighters arrived. They were taken to hospital by London Ambulance Service crews.
The fire is being treated as accidental and is believed to have been caused by the failure of a lithium battery.
A London Fire Brigade spokesperson said: “Lithium batteries store a significant amount of energy in a very small space and are much more powerful compared to other types of batteries. If that energy is released in an uncontrolled way, then a fire or explosion may result. If there is overheating, crushing, penetrating or overcharging, then a fault can occur within damaged battery cells which may cause the battery to catch fire and/or explode.
“Lithium batteries are susceptible to failure if incorrect chargers are used, so it’s important to always use the correct charger for the product and buy an official one from a reputable seller.
"You should also unplug your charger when you have finished using it and we would advise not to leave it unattended or charging while people are asleep.
“Try to ensure they are not getting knocked around while in use or while being carried as spares as this can increase the chance of damage to cells.”
The Brigade was called at 1948 and the fire was brought under control by 2104. Crews from Acton, North Kensington, Kensington and Richmond fire stations attended the scene.