fix for kbh as temps were not imported correctly issue was introduced woth commit: 72ea6ac2d7

This commit is contained in:
avollkopf 2024-04-29 17:32:13 +02:00
parent 822ed8df14
commit a818b471a7
2 changed files with 7 additions and 7 deletions

View file

@ -1,3 +1,3 @@
__version__ = "4.4.1.a2" __version__ = "4.4.1.a3"
__codename__ = "Yeast Starter" __codename__ = "Yeast Starter"

View file

@ -185,13 +185,12 @@ class UploadController:
row = c.fetchone() row = c.fetchone()
try: try:
if self.cbpi.config.get("TEMP_UNIT", "C") == "C": if self.cbpi.config.get("TEMP_UNIT", "C") == "C":
mashin_temp = str(float(row[0])) mashin_temp = str(int(row[0]))
else: else:
mashin_temp = str(round(9.0 / 5.0 * float(row[0]) + 32)) mashin_temp = str(round(9.0 / 5.0 * int(row[0]) + 32))
except: except:
pass pass
logging.error(mashin_temp)
# get the hop addition times # get the hop addition times
c.execute('SELECT Zeit, Name FROM Hopfengaben WHERE Vorderwuerze <> 1 AND SudID = ?', (Recipe_ID,)) c.execute('SELECT Zeit, Name FROM Hopfengaben WHERE Vorderwuerze <> 1 AND SudID = ?', (Recipe_ID,))
hops = c.fetchall() hops = c.fetchall()
@ -242,7 +241,7 @@ class UploadController:
"AutoMode": self.AutoMode, "AutoMode": self.AutoMode,
"Kettle": self.id, "Kettle": self.id,
"Sensor": self.kettle.sensor, "Sensor": self.kettle.sensor,
"Temp": str(float(row[1])) if self.TEMP_UNIT == "C" else str(round(9.0 / 5.0 * float(row[1]) + 32)), "Temp": str(int(row[1])) if self.TEMP_UNIT == "C" else str(round(9.0 / 5.0 * int(row[1]) + 32)),
"Timer": "0", "Timer": "0",
"Notification": "Target temperature reached. Please add malt." "Notification": "Target temperature reached. Please add malt."
}, },
@ -259,7 +258,7 @@ class UploadController:
"AutoMode": self.AutoMode, "AutoMode": self.AutoMode,
"Kettle": self.id, "Kettle": self.id,
"Sensor": self.kettle.sensor, "Sensor": self.kettle.sensor,
"Temp": str(float(row[1])) if self.TEMP_UNIT == "C" else str(round(9.0 / 5.0 * float(row[1]) + 32)), "Temp": str(int(row[1])) if self.TEMP_UNIT == "C" else str(round(9.0 / 5.0 * int(row[1]) + 32)),
"Timer": str(int(row[2])) "Timer": str(int(row[2]))
}, },
"status_text": "", "status_text": "",
@ -267,7 +266,7 @@ class UploadController:
"type": step_type "type": step_type
} }
await self.create_step(step_string) await self.create_step(step_string)
# MashOut -> Notification step that sends notification and waits for user input to move to next step (AutoNext=No) # MashOut -> Notification step that sends notification and waits for user input to move to next step (AutoNext=No)
if self.mashout == "NotificationStep": if self.mashout == "NotificationStep":
step_string = { "name": "Lautering", step_string = { "name": "Lautering",
@ -800,6 +799,7 @@ class UploadController:
else: else:
step_temp = str(round((9.0 / 5.0 * int(step['stepTemp']) + 32))) step_temp = str(round((9.0 / 5.0 * int(step['stepTemp']) + 32)))
logging.error(step_temp)
sensor = self.kettle.sensor sensor = self.kettle.sensor
if MashIn_Flag == True: if MashIn_Flag == True: