There is a string you can set when you update a sensor that will store the battery charge. I don't remember off hand, but it's something like:
module.BatteryLevel
The value is either 0-1 or 0-100 which I also don't recall at the moment. Either one of the other HG users who have worked with sensors can answer or you could check my signature scripts where I'm sure I set the value. It's really easy and once you do that, the widget will automatically display it.