Fixed scale countdown
This commit is contained in:
parent
49c641cb46
commit
0280825b9d
1 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ show_scale_countdown: int = 0 # Number of updates for the scale, until return t
|
||||||
|
|
||||||
average_person_weight: float = 75
|
average_person_weight: float = 75
|
||||||
|
|
||||||
is_warning_active: int = 0
|
is_warning_active: int = -1
|
||||||
leg_capacity_limit_patterns = [
|
leg_capacity_limit_patterns = [
|
||||||
{"limit": 80, "pattern": 110, "duration": 1000},
|
{"limit": 80, "pattern": 110, "duration": 1000},
|
||||||
{"limit": 90, "pattern": 110, "duration": 250},
|
{"limit": 90, "pattern": 110, "duration": 250},
|
||||||
|
@ -87,6 +87,9 @@ def check_for_change():
|
||||||
if show_scale_countdown > 0 and show_scale_countdown % 3 == 0:
|
if show_scale_countdown > 0 and show_scale_countdown % 3 == 0:
|
||||||
show_scale(latest["total"] - empty_weight)
|
show_scale(latest["total"] - empty_weight)
|
||||||
show_scale_countdown -= 1
|
show_scale_countdown -= 1
|
||||||
|
elif show_scale_countdown == 0:
|
||||||
|
show_scale_countdown -= 1
|
||||||
|
show_time()
|
||||||
|
|
||||||
# Is triggered?
|
# Is triggered?
|
||||||
delta = latest["total"] - local_history[-2]["total"]
|
delta = latest["total"] - local_history[-2]["total"]
|
||||||
|
@ -116,9 +119,6 @@ def check_for_change():
|
||||||
hue.in_room_activate_scene("Max Zimmer", "Sexy")
|
hue.in_room_activate_scene("Max Zimmer", "Sexy")
|
||||||
elif number_of_people == 1 and not weight_increased:
|
elif number_of_people == 1 and not weight_increased:
|
||||||
hue.in_room_activate_scene("Max Zimmer", "Tageslicht")
|
hue.in_room_activate_scene("Max Zimmer", "Tageslicht")
|
||||||
else:
|
|
||||||
show_scale_countdown = 0
|
|
||||||
show_time()
|
|
||||||
|
|
||||||
|
|
||||||
def add_line_to_bed_history(line: str) -> None:
|
def add_line_to_bed_history(line: str) -> None:
|
||||||
|
|
Loading…
Reference in a new issue