Two people were treated for smoke inhalation at the scene after a fire sparked by an e-scooter battery.