@wilsonpage has a very good point. The state name (low, verylow etc.) and the corresponding level is the only thing that needs to be configured. The rest of this could go in the battery controller.