flyte / apcaccess

MIT License
31 stars 7 forks source link

strip_units=True does not strip OUTCURNT units #2

Closed hrast01 closed 7 years ago

hrast01 commented 7 years ago

The OUTCURNT value still has Amps attached to it. Its an SMT1000.

from apcaccess import status as apc apc.parse(apc.get(host="127.0.0.1"), strip_units=True) OrderedDict([('APC', '001,039,0906'), ('DATE', '2017-04-26 17:59:07 -0500'), ('HOSTNAME', 'XXXXXX'), ('VERSION', '3.14.14 (31 May 2016) unknown'), ('UPSNAME', 'APCUPS'), ('CABLE', 'USB Cable'), ('DRIVER', 'MODBUS UPS Driver'), ('UPSMODE', 'Stand Alone'), ('STARTTIME', '2017-04-26 14:20:24 -0500'), ('MODEL', 'Smart-UPS 1000'), ('STATUS', 'ONLINE'), ('LINEV', '120.9'), ('LOADPCT', '35.7'), ('LOADAPNT', '26.0'), ('BCHARGE', '100.0'), ('TIMELEFT', '38.0'), ('MBATTCHG', '5'), ('MINTIMEL', '3'), ('MAXTIME', '600'), ('OUTPUTV', '120.9'), ('DWAKE', '0'), ('DSHUTD', '0'), ('ITEMP', '33.7'), ('BATTV', '26.8'), ('LINEFREQ', '60.0'), ('OUTCURNT', '2.16 Amps'), ('NUMXFERS', '0'), ('TONBATT', '0'), ('CUMONBATT', '0'), ('XOFFBATT', 'N/A'), ('SELFTEST', 'OK'), ('STATFLAG', '0x05000008'), ('MANDATE', '2016-12-03'), ('SERIALNO', '3S1648X05709'), ('BATTDATE', '2016-12-03'), ('NOMOUTV', '120'), ('NOMPOWER', '700'), ('NOMAPNT', '1000 VA'), ('FIRMWARE', 'UPS 09.3 / 00.4'), ('END APC', '2017-04-26 17:59:28 -050')])

flyte commented 7 years ago

Thanks for the info. I've added 'Amps' to the list of units to remove. Please don't hesitate to create another issue if you spot any further units to add.

I've just noticed the ('NOMAPNT', '1000 VA') entry - do you think the ' VA' should be removed too?