How to group battery components into capacities