fix battery output formatting

The battery formatting now also works when only %i is present in the format string, previously it would return random integer value.