mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-12-25 15:04:56 +01:00
update on fermentersteps for automode
This commit is contained in:
parent
36329fb533
commit
84f9bbb67f
4 changed files with 7 additions and 7 deletions
|
@ -1 +1 @@
|
|||
__version__ = "4.0.1.18.a5"
|
||||
__version__ = "4.0.1.18.a6"
|
||||
|
|
|
@ -50,7 +50,7 @@ class DashboardController:
|
|||
|
||||
async def get_custom_widgets(self):
|
||||
path = os.path.join(".", 'config', "dashboard", "widgets")
|
||||
onlyfiles = [os.path.splitext(f)[0] for f in listdir(path) if isfile(join(path, f)) and f.endswith(".svg")]
|
||||
onlyfiles = [os.path.splitext(f)[0] for f in sorted(listdir(path)) if isfile(join(path, f)) and f.endswith(".svg")]
|
||||
return onlyfiles
|
||||
|
||||
async def get_dashboard_numbers(self):
|
||||
|
|
|
@ -412,7 +412,7 @@ class FermentationController:
|
|||
self.save()
|
||||
except Exception as e:
|
||||
logging.error("Failed to stop fermenterstep - Id: %s" % step.id)
|
||||
|
||||
self.push_update()
|
||||
self.push_update("fermenterstepupdate")
|
||||
|
||||
except Exception as e:
|
||||
|
|
|
@ -125,9 +125,9 @@ class FermenterTargetTempStep(CBPiFermentationStep):
|
|||
async def setAutoMode(self, auto_state):
|
||||
try:
|
||||
if (self.fermenter.instance is None or self.fermenter.instance.state == False) and (auto_state is True):
|
||||
await self.fermenter.instance.toggle(self.fermenter.id)
|
||||
await self.cbpi.fermenter.toggle(self.fermenter.id)
|
||||
elif (self.fermenter.instance.state == True) and (auto_state is False):
|
||||
await self.fermenter.instance.stop(self.fermenter.id)
|
||||
await self.fermenter.instance.stop()
|
||||
await self.push_update()
|
||||
|
||||
except Exception as e:
|
||||
|
@ -228,9 +228,9 @@ class FermenterStep(CBPiFermentationStep):
|
|||
async def setAutoMode(self, auto_state):
|
||||
try:
|
||||
if (self.fermenter.instance is None or self.fermenter.instance.state == False) and (auto_state is True):
|
||||
await self.fermenter.instance.toggle(self.fermenter.id)
|
||||
await self.cbpi.fermenter.toggle(self.fermenter.id)
|
||||
elif (self.fermenter.instance.state == True) and (auto_state is False):
|
||||
await self.fermenter.instance.stop(self.fermenter.id)
|
||||
await self.fermenter.instance.stop()
|
||||
await self.push_update()
|
||||
|
||||
except Exception as e:
|
||||
|
|
Loading…
Reference in a new issue