Apparently not all systems have these values in /sys/class/power_supply, so the battery meter doesn't work. In the ACPI source code they use current_now and charge_now to calculate time remaining if other values aren't available, so I just ported that calculation and set it up to use that as a fallback.
I don't actually have a system where energy_now and energy_full exist, so I'd suggest testing this code on such a system to make sure it still works as expected. I'm not 100% confident in my Perl grep skills 😐.
Adding support for batteries without energy_now and energy_full.
If these values are not available it will try to use charge_now and
Fortunately, I have such a system :)
Tested, still working fine! Thanks for the patch.