fix calculation of fermentation end time -> Format still open

This commit is contained in:
avollkopf 2022-02-24 18:37:46 +01:00
parent b2d29678b5
commit d87a578447
2 changed files with 3 additions and 3 deletions

View file

@ -1 +1 @@
__version__ = "4.0.2.0.a1"
__version__ = "4.0.2.0.a2"

View file

@ -226,7 +226,7 @@ class FermenterStep(CBPiFermentationStep):
if sensor_value >= self.fermenter.target_temp and self.timer.is_running is not True:
self.timer.start()
self.timer.is_running = True
estimated_completion_time = datetime.fromtimestamp(time.time()+ (int(self.props.get("Timer",0)))*60)
estimated_completion_time = datetime.fromtimestamp(time.time()+ self.fermentationtime)
self.cbpi.notify(self.name, 'Timer started. Estimated completion: {}'.format(estimated_completion_time.strftime("%H:%M")), NotificationType.INFO)
elif self.fermenter.target_temp <= self.starttemp:
logging.info("cooldown")
@ -236,7 +236,7 @@ class FermenterStep(CBPiFermentationStep):
if sensor_value <= self.fermenter.target_temp and self.timer.is_running is not True:
self.timer.start()
self.timer.is_running = True
estimated_completion_time = datetime.fromtimestamp(time.time()+ (int(self.props.get("Timer",0)))*60)
estimated_completion_time = datetime.fromtimestamp(time.time()+ self.fermentationtime)
self.cbpi.notify(self.name, 'Timer started. Estimated completion: {}'.format(estimated_completion_time.strftime("%H:%M")), NotificationType.INFO)
return StepResult.DONE