diff --git a/src/endpoints/handlers/bett.py b/src/endpoints/handlers/bett.py index 2fc5e23..203c4a1 100644 --- a/src/endpoints/handlers/bett.py +++ b/src/endpoints/handlers/bett.py @@ -98,7 +98,9 @@ def check_for_change(): # 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]) + clusters = get_clusters( + [d["total"] for d in local_history], min_noticable_difference + ) empty_weight = min([median(cluster) for cluster in clusters.values()]) logging.info(f"Empty weight: {empty_weight}")