From 12d487bd3acd5dfc6d7f95765d0eb4e8ce7b9fef Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 15 Mar 2021 12:59:55 +0100 Subject: [PATCH] Fix: issuses #57 --- cbpi/extension/mashstep/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cbpi/extension/mashstep/__init__.py b/cbpi/extension/mashstep/__init__.py index b4547ef..b94fa70 100644 --- a/cbpi/extension/mashstep/__init__.py +++ b/cbpi/extension/mashstep/__init__.py @@ -5,15 +5,12 @@ from cbpi.api.timer import Timer from cbpi.api import * import logging + @parameters([Property.Number(label="Timer", description="Time in Minutes", configurable=True), Property.Number(label="Temp", configurable=True), Property.Sensor(label="Sensor"), Property.Kettle(label="Kettle")]) class MashStep(CBPiStep): - - - - async def on_timer_done(self,timer): self.summary = "" await self.next() @@ -25,6 +22,8 @@ class MashStep(CBPiStep): async def on_start(self): if self.timer is None: self.timer = Timer(int(self.props.Timer) *60 ,on_update=self.on_timer_update, on_done=self.on_timer_done) + if self.cbpi.kettle is not None: + await self.cbpi.kettle.set_target_temp(self.props.Kettle, int(self.props.Temp)) self.summary = "Waiting for Target Temp" await self.push_update() @@ -72,6 +71,8 @@ class WaitStep(CBPiStep): async def on_start(self): if self.timer is None: self.timer = Timer(int(self.props.Timer) * 60,on_update=self.on_timer_update, on_done=self.on_timer_done) + if self.cbpi.kettle is not None: + await self.cbpi.kettle.set_target_temp(self.props.Kettle, int(self.props.Temp)) self.timer.start() async def on_stop(self):