bettwaage-sidequest #2
1 changed files with 3 additions and 1 deletions
|
@ -98,7 +98,9 @@ def check_for_change():
|
||||||
# Make sure there is a bed_weight
|
# Make sure there is a bed_weight
|
||||||
global empty_weight
|
global empty_weight
|
||||||
if empty_weight is None:
|
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()])
|
empty_weight = min([median(cluster) for cluster in clusters.values()])
|
||||||
logging.info(f"Empty weight: {empty_weight}")
|
logging.info(f"Empty weight: {empty_weight}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue