Add battery diagnostics to Groovy.