From b6e3e2778e6dbf87749702f54da661016ee76f79 Mon Sep 17 00:00:00 2001 From: Gilles Grandou Date: Thu, 21 Apr 2022 12:46:05 +0200 Subject: [PATCH] keep only 1 signifcant digit for temperature --- pool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pool.js b/pool.js index 72fb4ab..24d852f 100644 --- a/pool.js +++ b/pool.js @@ -180,8 +180,8 @@ function update_temp(temp) { } status.lock_update = true; - status.temp = temp; - status.temp_today = Math.max(status.temp_today, temp); + status.temp = Math.round(temp * 10) / 10; + status.temp_today = Math.max(status.temp_today, status.temp); status.temp_max = Math.max(status.temp_today, status.temp_yesterday); print("[POOL] update_temp - max:", status.temp_max, "today:", status.temp_today, "yesterday:", status.temp_yesterday);