Description
On all of our Riello UPS, there is an intermittently visible sensor for 'upsBatteryCurrent'
On UPS such as these, this appears to show the battery charge/discharge current. Most of the time the current floats at zero amps. Sometimes it is discharging (if doing a self-test) and sometimes it is charging (after a self-test or after a power outage).
When the discovery runs, it seems that if the charge current is 'zero' then the sensor is removed. If the discovery runs and the sensor is non-zero, then it is added.
Unfortunately, when it is re-added, it's thresholds are recreated and set with a low alarm of zero. This causes an alarm event to be triggered as the threshold is violated shortly after discovery.
Manually setting the thresholds is not possible as the sensors are rediscovered again later with blank thresholds once again.
My recommendation (FWIW) - Allow the sensor to be considered 'valid' even if it is at zero when the discovery runs, with default thresholds of -1A and +1A then let the user set the thresholds for it as these are UPS dependent but are 'zero' most of the time. Otherwise there is no point discovering it because, in reality, the only time you are interested in the value for it is when it is non-zero (at which point you are likely on battery or having a fault of some kind)
If i've explained any of this badly, just let me know, cheers!