bettwaage-sidequest #2

Merged
m.giller merged 38 commits from bettwaage-sidequest into master 2024-06-07 23:38:56 +02:00
Showing only changes of commit 33617ec7a3 - Show all commits

View file

@ -91,9 +91,6 @@ def check_for_change():
if show_scale_countdown % 3 == 0:
show_scale(latest["total"] - empty_weight)
show_scale_countdown -= 1
elif show_scale_countdown == 0:
show_scale_countdown -= 1
show_time()
# Is triggered?
delta = latest["total"] - local_history[-2]["total"]
@ -115,11 +112,14 @@ def check_for_change():
number_of_people = round((latest["total"] - empty_weight) / average_person_weight)
logging.info(f"Number of people: {number_of_people}")
if number_of_people == 1 and weight_increased:
# Show scale?
if number_of_people == 1 and weight_increased and show_scale_countdown == 0:
show_scale_countdown = 60 # Should be a multiple of 3
elif number_of_people >= 2 and weight_increased:
else:
show_scale_countdown = 0
show_time()
# Make room sexy
if number_of_people >= 2 and weight_increased:
hue.in_room_activate_scene("Max Zimmer", "Sexy")
elif number_of_people == 1 and not weight_increased:
hue.in_room_activate_scene("Max Zimmer", "Tageslicht")