mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-09 17:07:43 +01:00
Fermentation controller will start step instead of logic after restart
This commit is contained in:
parent
c5acb68c6b
commit
ff37779863
5 changed files with 7 additions and 5 deletions
|
@ -1 +1 @@
|
|||
__version__ = "4.0.2.0.a3"
|
||||
__version__ = "4.0.2.0.a4"
|
||||
|
|
|
@ -156,6 +156,8 @@ class FermentationController:
|
|||
name = item.get("name")
|
||||
props = Props(item.get("props"))
|
||||
status = StepState(item.get("status", "I"))
|
||||
if status == StepState.ACTIVE:
|
||||
status = StepState("S")
|
||||
type = item.get("type")
|
||||
|
||||
try:
|
||||
|
|
|
@ -198,7 +198,7 @@ class StepController:
|
|||
def get_types(self):
|
||||
result = {}
|
||||
for key, value in self.types.items():
|
||||
if "ferment" not in str(value.get("class")).lower():
|
||||
#if "ferment" not in str(value.get("class")).lower():
|
||||
result[key] = dict(name=value.get("name"), properties=value.get("properties"), actions=value.get("actions"))
|
||||
return result
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class FermenterAutostart(CBPiExtension):
|
|||
self.fermenter=self.cbpi.fermenter._find_by_id(fermenter_id)
|
||||
try:
|
||||
if (self.fermenter.instance is None or self.fermenter.instance.state == False):
|
||||
await self.cbpi.fermenter.toggle(self.fermenter.id)
|
||||
await self.cbpi.fermenter.start(self.fermenter.id)
|
||||
logging.info("Successfully switched on Ferenterlogic for Fermenter {}".format(self.fermenter.id))
|
||||
except Exception as e:
|
||||
logging.error("Failed to switch on FermenterLogic {} {}".format(self.fermenter.id, e))
|
||||
|
|
|
@ -10,7 +10,7 @@ logger = logging.getLogger(__name__)
|
|||
try:
|
||||
import RPi.GPIO as GPIO
|
||||
except Exception:
|
||||
logger.error("Failed to load RPi.GPIO. Using Mock")
|
||||
logger.warning("Failed to load RPi.GPIO. Using Mock")
|
||||
MockRPi = MagicMock()
|
||||
modules = {
|
||||
"RPi": MockRPi,
|
||||
|
|
Loading…
Reference in a new issue