From 8631c8c111d88452ca4e5a7a060e357d09dc0476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Balzarotti?= Date: Sat, 19 Nov 2022 19:47:02 +0100 Subject: [PATCH] update yogurt recipe --- phasectrl.py | 2 +- recipes.json | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/phasectrl.py b/phasectrl.py index bd9a527..4de3026 100644 --- a/phasectrl.py +++ b/phasectrl.py @@ -31,7 +31,7 @@ def load_recipe(json): nextcond=fallback('exit_condition')) return Recipe( json['name'], json['variant'], json['description'], - json['controllers'], + json.get('controllers', ()), tuple(load_phase(p) for p in json['phases'])) def load_recipes(file): diff --git a/recipes.json b/recipes.json index f6de74d..d3bde42 100644 --- a/recipes.json +++ b/recipes.json @@ -11,19 +11,14 @@ "name": "Preheat", "description": "Preheat yogurt to 82°", "on_load": "(begin (set-controller \"heater\" \"T_food\")\n(set-target \"T_food\" 82.0))", - "exit_condition": "(and (>= (get-sensor \"T_food\") 81.5)\n(> (time-in-this-phase) (seconds 1)))" + "exit_condition": "(and (>= (get-sensor \"T_food\") 81.5)\n(> (time-in-this-phase) (minutes 15)))" }, { "name": "Cool", "description": "Cool to 46°", + "on_load": "(set-target \"T_food\" 46.0)", "exit_condition": "(and (< (get-sensor \"T_food\") 46.0)\n(> (get-sensor \"T_food\") 42.0))" }, - { - "name": "Hold", - "description": "Keep at 42° for 3h", - "exit_condition": "(> (time-in-this-phase) (seconds 5))", - "on_exit": "(notify \"You can remove the yogurt from the heater\")" - }, { "name": "Inoculate", "description": "Add 50ml Yogurt", @@ -34,7 +29,8 @@ { "name": "Hold", "description": "Keep at 42° for 3h", - "exit_condition": "(> (time-in-this-phase) (seconds 3))", + "on_load": "(set-target \"T_food\" 41.0)", + "exit_condition": "(> (time-in-this-phase) (hours 3))", "on_exit": "(notify \"You can remove the yogurt from the heater\")" } ]