Temperature Alert
Build, push image, and notify Watchtower / build-image (push) Successful in 1m17s
Build, push image, and notify Watchtower / notify (push) Successful in 16s

This commit is contained in:
2026-08-17 13:04:35 +02:00
parent 01eccf47c6
commit 83b269cc88
7 changed files with 93 additions and 30 deletions
+7 -3
View File
@@ -87,7 +87,8 @@ class MicrowaveScreen:
if cooking_state and cooking_state.state == CookingStates.STIRRING_REQUIRED:
self._message("Pls Stir", True)
elif cooking_state and cooking_state.state == CookingStates.ALERT:
self._message("Alert !", True)
# nothing to do, the alert will be displayed by the alert manager
return
elif cooking_state and cooking_state.state == CookingStates.DONE:
self._message("Done !", False)
elif microwave_state and microwave_state == MicrowaveState.ANALYZING:
@@ -96,7 +97,10 @@ class MicrowaveScreen:
elif microwave_state and microwave_state == MicrowaveState.WAITING_FOR_CLOUD:
self.display.blit(fb_image_cloud_sync_bits, 55, 24)
self._secondary_message("Receiving...", False)
else: # Progress bar
elif microwave_state and microwave_state == MicrowaveState.ALERT:
# nothing to do, the alert will be displayed by the alert manager
pass
elif cooking_state: # Progress bar
elapsed_time = cooking_state.get_elapsed_time()
estimated_progress = elapsed_time / (elapsed_time + cooking_state.estimated_remaining_time)
self._progressBar(estimated_progress, 21, 25)
@@ -132,7 +136,7 @@ class MicrowaveScreen:
def _message_at(self, y, text, alert):
self.display.fill_rect(0, y, self.width, CHARACTER_HEIGHT + 4, 1)
if alert:
self.display.blit(fb_image_Alert_bits, 10, y+2)
self.display.blit(fb_image_Alert_bits, 1, y+2)
self.display.blit(fb_image_Alert_bits, self.width - 10, y+2)
self.h_centered_text(text, y+2, 0)