Hi, I'm working on a modpack that has battery charging/discharging like yours, so I looked at your code.
- For the battery discharger you have
min_perceived_performance = 1
to make it animate at full speed when it's generating at less than 100% capacity, but that has stopped working in 2.0, they renamed it so you need perceived_performance = { minimum = 1 }
- Quality increases the speed of furnaces including your battery chargers, but it doesn't increase power consumption. That means anything above the lowest quality of battery charger makes it very easy to generate free energy by charging and discharging batteries. I cannot find any way to fix this at all. For my modpack I'm probably going to just disable all higher qualities for everything using the No Quality mod but other than that I can't see any solution.