From: Alexander Vasarab Date: Tue, 16 Feb 2021 05:37:37 +0000 (-0800) Subject: Round precip accum to 2 decimal places X-Git-Tag: v3.2.2^2~1^2 X-Git-Url: https://wylark.com/src/infoex-autowx.git/commitdiff_plain/07dd380ab9bdb7f6357d1c6c2328856ea00cd20e Round precip accum to 2 decimal places --- diff --git a/infoex-autowx.py b/infoex-autowx.py index 1f25bc5..1844d45 100755 --- a/infoex-autowx.py +++ b/infoex-autowx.py @@ -294,6 +294,8 @@ def main(): infoex['wx_data'][element_cd] = round(infoex['wx_data'][element_cd]) elif element_cd in ['TOBS', 'air_temp', 'PRES', 'pressure']: infoex['wx_data'][element_cd] = round(infoex['wx_data'][element_cd], 1) + elif element_cd in ['PREC', 'precip_accum']: + infoex['wx_data'][element_cd] = round(infoex['wx_data'][element_cd], 2) # CONSIDER: Casting every value to Float() -- need to investigate if # any possible elementCds we may want are any other data