add condition for mashout step

add mashout step only if temp of last step is not the same as "Abmaischtemperatur" in MMuM-JSON.
This commit is contained in:
pascal1404 2022-01-25 18:34:11 +01:00
parent 7c90340236
commit 1ecc8451e4

View file

@ -388,11 +388,13 @@ class UploadController:
# AutoMode is yes to start and stop automatic mode or each step
MashIn_Flag = True
step_kettle = self.id
last_step_temp = 0
logging.info(step_kettle) ###################################################
for row in self.getSteps(Recipe_ID, "json"):
step_name = str(row.get("name"))
step_timer = str(int(row.get("timer")))
step_temp = str(int(row.get("temp")))
last_step_temp = step_temp
sensor = self.kettle.sensor
if MashIn_Flag == True:
if row.get("timer") == 0:
@ -447,6 +449,7 @@ class UploadController:
await self.create_step(step_string)
# MashOut -> mashStep to reach mashout-temp for 1 min
if last_step_temp != e["Abmaischtemperatur"]:
step_string = { "name": "MashOut",
"props": {
"AutoMode": self.AutoMode,