flyte / apcaccess

MIT License
31 stars 7 forks source link

LOADPCT isn't stripped (25.0 Percent Load Capacity) #3

Closed michaelarnauts closed 7 years ago

michaelarnauts commented 7 years ago

LOADPCT returns "24.0 Percent Load Capacity" what isn't in the list of units. This prevents the unit to be stripped off.

This seems to be the documented behavior of apcuspd according to the manual if you do a search for "Percent Load Capacity" in http://www.apcupsd.org/manual/manual.html

OrderedDict([
 ('APC', '001,038,1015'),
 ('DATE', '2017-06-17 15:47:04 +0200'),
 ('HOSTNAME', 'rafael.local'),
 ('VERSION', '3.14.10 (13 September 2011) debian'),
 ('UPSNAME', 'ups'),
 ('CABLE', 'USB Cable'),
 ('DRIVER', 'USB UPS Driver'),
 ('UPSMODE', 'Stand Alone'),
 ('STARTTIME', '2016-12-21 20:14:57 +0100'),
 ('MODEL', 'Back-UPS XS 700U'),
 ('STATUS', 'ONLINE'),
 ('LINEV', '226.0 Volts'),
 ('LOADPCT', '24.0 Percent Load Capacity'), # --> this line
 ('BCHARGE', '100.0 Percent'),
 ('TIMELEFT', '21.9 Minutes'),
 ('MBATTCHG', '5 Percent'),
 ('MINTIMEL', '3 Minutes'),
 ('MAXTIME', '0 Seconds'),
 ('SENSE', 'Medium'),
 ('LOTRANS', '140.0 Volts'),
 ('HITRANS', '300.0 Volts'),
 ('ALARMDEL', '30 seconds'),
 ('BATTV', '13.6 Volts'),
 ('LASTXFER', 'Automatic or explicit self test'),
 ('NUMXFERS', '19'),
 ('XONBATT', '2017-06-12 21:50:13 +0200'),
 ('TONBATT', '0 seconds'),
 ('CUMONBATT', '341 seconds'),
 ('XOFFBATT', '2017-06-12 21:50:23 +0200'),
 ('LASTSTEST', '2017-06-12 21:50:13 +0200'),
 ('SELFTEST', 'NO'),
 ('STATFLAG', '0x07000008 Status Flag'),
 ('SERIALNO', '3B1641X30700'),
 ('BATTDATE', '2016-10-14'),
 ('NOMINV', '230 Volts'),
 ('NOMBATTV', '12.0 Volts'),
 ('NOMPOWER', '390 Watts'),
 ('FIRMWARE', '924.Z3 .I USB FW:Z3'),
 ('END APC', '2017-06-17 15:47:04 +020')
])
flyte commented 7 years ago

Thanks for the issue report! I've removed "Percent Load Capacity" unit now, as of version 0.0.13.