update on fermentersteps for automode

This commit is contained in:
avollkopf 2022-02-21 17:54:22 +01:00
parent 36329fb533
commit 84f9bbb67f
4 changed files with 7 additions and 7 deletions

View file

@ -1 +1 @@
__version__ = "4.0.1.18.a5"
__version__ = "4.0.1.18.a6"

View file

@ -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):

View file

@ -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:

View file

@ -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: