Diesel heaters don’t necessarily need electricity. However, most modern diesel heaters that can be used in cars use thermostats that require electricity. They can be plugged into a car’s 12V charger for electricity which controls the desired in-car temperature. Electricity also powers any sensors these heaters come with such as low-oxygen sensors