Gas fireplaces and fireplace inserts use thermocouples and thermopiles primarily to generate electricity. When turned on, the pilot in a gas stove generates heat, which travels through a thermocouple. As the heat reaches the second junction of the thermocouple, it generates electrical voltage.