A bedroom fire at a terraced house was caused by a mobile phone left charging on a bed, the fire service has said.