From 757df0f571b43750fd8d1228da25a990a02190bb Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 17 Oct 2017 11:32:17 -0400 Subject: [PATCH] Reduce noise of one off reading Per request, limit the display precision of floats in the nodesensors command readout. --- confluent_client/bin/nodesensors | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_client/bin/nodesensors b/confluent_client/bin/nodesensors index 58b1281b..7e5cc8d6 100755 --- a/confluent_client/bin/nodesensors +++ b/confluent_client/bin/nodesensors @@ -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''):