Update battery to handle logic for controlling charging