From 49c641cb4665bb6b39cba9c35cadf3bfa7a85aab Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Mon, 6 May 2024 23:06:51 +0200 Subject: [PATCH] Fixed global empty_weight --- src/endpoints/handlers/bett.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/endpoints/handlers/bett.py b/src/endpoints/handlers/bett.py index d593fb5..3a6baad 100644 --- a/src/endpoints/handlers/bett.py +++ b/src/endpoints/handlers/bett.py @@ -82,6 +82,7 @@ def check_for_change(): return global show_scale_countdown + global empty_weight latest = local_history[-1] if show_scale_countdown > 0 and show_scale_countdown % 3 == 0: show_scale(latest["total"] - empty_weight) @@ -96,7 +97,6 @@ def check_for_change(): weight_increased = delta > 0 # Make sure there is a bed_weight - global empty_weight if empty_weight is None: clusters = get_clusters( [d["total"] for d in local_history], min_noticable_difference