Skip to content

Commit

Permalink
get first ferment target temp from BF for cooldown step
Browse files Browse the repository at this point in the history
  • Loading branch information
avollkopf committed Jul 12, 2024
1 parent 4de128f commit e0b220d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cbpi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "4.4.3.a5"
__version__ = "4.4.3.a6"
__codename__ = "Yeast Starter"

20 changes: 18 additions & 2 deletions cbpi/controller/upload_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,21 @@ async def bf_recipe_creation(self, Recipe_ID):
except:
miscs = None

try:
fermentation_steps=bf_recipe['fermentation']['steps']
except:
fermentation_steps=None

if fermentation_steps is not None:
try:
step=fermentation_steps[0]
self.fermentation_step_temp=int(step['stepTemp'])
except:
self.fermentation_step_temp=None

if self.fermentation_step_temp is not None and self.TEMP_UNIT != "C":
self.fermentation_step_temp = round((9.0 / 5.0 * float(self.fermentation_step_temp)+ 32))

FirstWort = self.getFirstWort(hops, "bf")

await self.create_recipe(RecipeName)
Expand Down Expand Up @@ -1052,8 +1067,9 @@ async def create_Whirlpool_Cooldown(self, time : str = "15"):
cooldown_sensor = self.cbpi.config.get("steps_cooldown_sensor", None)
if cooldown_sensor is None or cooldown_sensor == '':
cooldown_sensor = self.boilkettle.sensor # fall back to boilkettle sensor if no other sensor is specified
step_timer = ""
step_temp = int(self.CoolDownTemp)
step_timer = ""

step_temp = int(self.CoolDownTemp) if (self.fermentation_step_temp is None or self.fermentation_step_temp <= int(self.CoolDownTemp)) else self.fermentation_step_temp
step_string = { "name": "Cooldown",
"props": {
"Kettle": self.boilid,
Expand Down

0 comments on commit e0b220d

Please sign in to comment.