APC UPS Binding

, ,

OK, there is white space after the label. Use

results.put(split.get(0).trim, split.get(1).trim)

to strip out the white spaces after the label names. You need to split the white space before the value as well or else it can’t be parsed into a number.

1 Like