diff --git a/cbpi/__init__.py b/cbpi/__init__.py index 7524b41..4851b45 100644 --- a/cbpi/__init__.py +++ b/cbpi/__init__.py @@ -1 +1 @@ -__version__ = "4.0.0.23" \ No newline at end of file +__version__ = "4.0.0.24" \ No newline at end of file diff --git a/cbpi/controller/config_controller.py b/cbpi/controller/config_controller.py index 1db9608..f9b8a00 100644 --- a/cbpi/controller/config_controller.py +++ b/cbpi/controller/config_controller.py @@ -15,6 +15,7 @@ class ConfigController: self.cbpi = cbpi self.cbpi.register(self) self.path = os.path.join(".", 'config', "config.json") + self.path_static = os.path.join(".", 'config', "config.yaml") def get_state(self): @@ -26,6 +27,7 @@ class ConfigController: async def init(self): + self.static = load_config(self.path_static) with open(self.path) as json_file: data = json.load(json_file) for key, value in data.items(): diff --git a/cbpi/extension/mashstep/__init__.py b/cbpi/extension/mashstep/__init__.py index e2af218..154e030 100644 --- a/cbpi/extension/mashstep/__init__.py +++ b/cbpi/extension/mashstep/__init__.py @@ -22,7 +22,7 @@ class MashStep(CBPiStep): async def on_start(self): if self.timer is None: - self.timer = Timer(10,on_update=self.on_timer_update, on_done=self.on_timer_done) + self.timer = Timer(int(self.props.Timer) *60 ,on_update=self.on_timer_update, on_done=self.on_timer_done) self.summary = "Waiting for Target Temp" await self.push_update() @@ -32,7 +32,7 @@ class MashStep(CBPiStep): await self.push_update() async def reset(self): - self.timer = Timer(10,on_update=self.on_timer_update, on_done=self.on_timer_done) + self.timer = Timer(int(self.props.Timer) *60 ,on_update=self.on_timer_update, on_done=self.on_timer_done) async def run(self): while True: @@ -55,7 +55,7 @@ class WaitStep(CBPiStep): async def on_start(self): if self.timer is None: - self.timer = Timer(int(self.props.Timer),on_update=self.on_timer_update, on_done=self.on_timer_done) + self.timer = Timer(int(self.props.Timer) * 60,on_update=self.on_timer_update, on_done=self.on_timer_done) self.timer.start() async def on_stop(self): @@ -64,7 +64,7 @@ class WaitStep(CBPiStep): await self.push_update() async def reset(self): - self.timer = Timer(int(self.props.Timer),on_update=self.on_timer_update, on_done=self.on_timer_done) + self.timer = Timer(int(self.props.Timer) * 60,on_update=self.on_timer_update, on_done=self.on_timer_done) async def run(self): while True: @@ -84,7 +84,7 @@ class ActorStep(CBPiStep): async def on_start(self): if self.timer is None: - self.timer = Timer(int(self.props.Timer),on_update=self.on_timer_update, on_done=self.on_timer_done) + self.timer = Timer(int(self.props.Timer) * 60,on_update=self.on_timer_update, on_done=self.on_timer_done) self.timer.start() await self.actor_on(self.props.Actor) @@ -95,7 +95,7 @@ class ActorStep(CBPiStep): await self.push_update() async def reset(self): - self.timer = Timer(int(self.props.Timer),on_update=self.on_timer_update, on_done=self.on_timer_done) + self.timer = Timer(int(self.props.Timer) *60 ,on_update=self.on_timer_update, on_done=self.on_timer_done) async def run(self): @@ -120,7 +120,7 @@ class BoilStep(CBPiStep): async def on_start(self): if self.timer is None: - self.timer = Timer(10,on_update=self.on_timer_update, on_done=self.on_timer_done) + self.timer = Timer(int(self.props.Timer) *60 ,on_update=self.on_timer_update, on_done=self.on_timer_done) self.summary = "Waiting for Target Temp" await self.push_update() @@ -131,7 +131,7 @@ class BoilStep(CBPiStep): await self.push_update() async def reset(self): - self.timer = Timer(10,on_update=self.on_timer_update, on_done=self.on_timer_done) + self.timer = Timer(int(self.props.Timer) *60 ,on_update=self.on_timer_update, on_done=self.on_timer_done) @action("Start Timer", []) async def star_timer(self):