It was necessary to look at the DTH to get the formula. Part of the problem is the keypad DTH and for that matter all DTHs provide the battery power as a percentage versus the actual voltage. Showing the actual voltage along with the pseudo percentage would be much more useful for me.
You also confirm what I told @joelw135 in a private message. “Use a volt meter; the keypad device could be providing incorrect measurements; the keypad percentage calculation may be inaccurate”
When the keypad reports a voltage value of hex 1c or 2.8 volts the percentage could be calculated as
2.8/3.0 = x/100 or about 93%
The DTH attempts to compensate for the unknown(afaik) “what is the lowest voltage at which the device will properly operate”. So you get this result
0% <=2.5 volts
20% = 2.6 volts
40% = 2.7 volts
60% = 2.8 volts
80% = 2.9 volts
100% >= 3.0 volts
Another factor making battery percentage aribtrary is it does not consider how long the battery will continue producing the voltage. So do you want a battery that starts at and will produce 2.8 volts for 3 years, or one that starts at 3.0 and drops to 2.6 in 6 months?