From 28b1bca5f67f91902770ff0a4ed11569c6bc34c0 Mon Sep 17 00:00:00 2001 From: Rhuan Costa Date: Sat, 3 Feb 2018 22:41:32 -0200 Subject: [PATCH] Fixed bug when not all hop times are filled When hop times were left blank on boiling configuration, step timer didn't appear on GUI, neither the alert. Alert time also fixed to be shown the entered amount of minutes before the end of boiling process. Not after the boiling start. --- modules/base_plugins/brew_steps/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/base_plugins/brew_steps/__init__.py b/modules/base_plugins/brew_steps/__init__.py index 0c21341..fdd4962 100644 --- a/modules/base_plugins/brew_steps/__init__.py +++ b/modules/base_plugins/brew_steps/__init__.py @@ -201,9 +201,9 @@ class BoilStep(StepBase): def check_hop_timer(self, number, value): - - if self.__getattribute__("hop_%s_added" % number) is not True and time.time() > ( - self.timer_end - (int(self.timer) * 60 - int(value) * 60)): + if (value != "" + and self.__getattribute__("hop_%s_added" % number) is not True + and (time.time() > (self.timer_end - int(value)*60))): self.__setattr__("hop_%s_added" % number, True) self.notify("Hop Alert", "Please add Hop %s" % number, timeout=None)