Ah ok. I see in the lua code that you need batteries in the cars equipment grid.
if car.name == CAR_ELECTRIC then
fueled = car.grid.available_in_batteries >= CAR_CONSUMPTION_ELECTRIC
local equipment = car.grid.equipment
consume = function()
local energy = CAR_CONSUMPTION_ELECTRIC
for i = 1,#equipment,1 do
local battery = equipment[i]
if battery.prototype.type == "battery-equipment" and battery.energy > 0 then
local take = min(energy, battery.energy)
battery.energy = battery.energy - take
energy = energy - take
end
if energy <= 0 then
break
end
end
end
end