From b9c1dccf484478e6adaab36e59397e256f6b864c Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sat, 5 Jun 2021 09:48:39 -0700 Subject: [PATCH] Fix rounding of seconds on home stats --- data/interfaces/default/home_stats.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/interfaces/default/home_stats.html b/data/interfaces/default/home_stats.html index cb973169..1f08c068 100644 --- a/data/interfaces/default/home_stats.html +++ b/data/interfaces/default/home_stats.html @@ -58,6 +58,8 @@ DOCUMENTATION :: END # Human readable duration def hd(seconds): m, s = divmod(cast_to_int(seconds), 60) + if s > 30: + m += 1 h, m = divmod(m, 60) return str(h).zfill(1) + ':' + str(m).zfill(2) %>