cooking state logs at interval

This commit is contained in:
2026-08-07 16:13:47 +02:00
parent f30b29be69
commit ec9be8ac30
+7 -3
View File
@@ -198,13 +198,17 @@ async def lora_process_task():
async def cooking_loop_task():
"""Ticks the cooking state and logs information periodically."""
"""Ticks the cooking state and logs information periodically without flooding output."""
log_counter = 0
while True:
if cooking_state is not None:
cooking_state.update_tick()
log_counter += 1
# Print log output every 5 seconds (10 ticks x 500ms)
if log_counter % 10 == 0:
print(f"[Cooking Task] State: {cooking_state.state}, Temp: {cooking_state.current_dish_temp}, "
f"Paused: {cooking_state.paused}, Remaining: {cooking_state.get_remaining_time():.2f}s, "
f"Est. Remaining: {cooking_state.get_remaining_time_estimation():.2f}s")
f"Paused: {cooking_state.paused}, Remaining: {cooking_state.get_remaining_time():.2f}s")
await asyncio.sleep_ms(500)