2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Reduce noise of one off reading

Per request, limit the display precision of floats in the nodesensors
command readout.
This commit is contained in:
Jarrod Johnson 2017-10-17 11:32:17 -04:00
parent bfc2b65e99
commit 757df0f571

View File

@ -126,6 +126,8 @@ def sensorpass(showout=True, appendtime=False):
if showout:
if sensedata['value'] is None:
showval = ''
elif isinstance(sensedata['value'], float):
showval = u' {0:.5f} '.format(sensedata['value'])
else:
showval = u' {0} '.format(sensedata['value'])
if sensedata['units'] not in (None, u''):