Fix precip numbers.
[kiosk.git] / weather_renderer.py
index 1e462d3d8d97259ee77d4123838cd11debeec7e0..07432ebed59131bdd72045af779396d69a023df0 100644 (file)
@@ -268,7 +268,7 @@ function makePrecipChart(name, xValues, yValues) {
                     aggregate_daily_precip += hourly_aggregate
                     precip[date].append(hourly_aggregate)
                 logger.debug(
-                    f"Aggregate precip on {date} was {aggregate_daily_precip} cm"
+                    f"Aggregate precip on {date} was {aggregate_daily_precip} mm"
                 )
                 if first_day:
                     while len(precip[date]) < 8:
@@ -326,9 +326,9 @@ function makePrecipChart(name, xValues, yValues) {
 """
                 )
 
-                # Total aggregate_precip in inches
-                aggregate_daily_precip /= 2.54
-                if aggregate_daily_precip > 0.025:
+                # Total aggregate_precip in inches (from mm)
+                aggregate_daily_precip /= 25.4
+                if aggregate_daily_precip > 0.001:
                     f.write(
                         f"""
   <td width=33%>