mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-10 01:17:42 +01:00
Update kettle controller/mashsteps
This commit is contained in:
parent
2fca6dcdc9
commit
a0e89fe4dc
3 changed files with 14 additions and 6 deletions
|
@ -1 +1 @@
|
||||||
__version__ = "4.0.0.45"
|
__version__ = "4.0.0.46"
|
||||||
|
|
|
@ -23,7 +23,7 @@ class KettleController(BasicController):
|
||||||
await item.instance.stop()
|
await item.instance.stop()
|
||||||
await self.push_udpate()
|
await self.push_udpate()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error("Faild to switch on KettleLogic {} {}".format(id, e))
|
logging.error("Failed to switch on KettleLogic {} {}".format(id, e))
|
||||||
|
|
||||||
async def set_target_temp(self, id, target_temp):
|
async def set_target_temp(self, id, target_temp):
|
||||||
try:
|
try:
|
||||||
|
@ -31,5 +31,13 @@ class KettleController(BasicController):
|
||||||
item.target_temp = target_temp
|
item.target_temp = target_temp
|
||||||
await self.save()
|
await self.save()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error("Faild to set Target Temp {} {}".format(id, e))
|
logging.error("Failed to set Target Temp {} {}".format(id, e))
|
||||||
|
|
||||||
|
async def stop(self, id):
|
||||||
|
try:
|
||||||
|
logging.info("Stop Kettele {}".format(id))
|
||||||
|
item = self.find_by_id(id)
|
||||||
|
await item.instance.stop()
|
||||||
|
await self.push_udpate()
|
||||||
|
except Exception as e:
|
||||||
|
logging.error("Failed to switch off KettleLogic {} {}".format(id, e))
|
||||||
|
|
|
@ -119,7 +119,7 @@ class MashInStep(CBPiStep):
|
||||||
if (self.kettle.instance is None or self.kettle.instance.state == False) and (auto_state is True):
|
if (self.kettle.instance is None or self.kettle.instance.state == False) and (auto_state is True):
|
||||||
await self.cbpi.kettle.toggle(self.kettle.id)
|
await self.cbpi.kettle.toggle(self.kettle.id)
|
||||||
elif (self.kettle.instance.state == True) and (auto_state is False):
|
elif (self.kettle.instance.state == True) and (auto_state is False):
|
||||||
await self.kettle.instance.stop()
|
await self.cbpi.kettle.stop(self.kettle.id)
|
||||||
await self.push_update()
|
await self.push_update()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -211,7 +211,7 @@ class MashStep(CBPiStep):
|
||||||
if (self.kettle.instance is None or self.kettle.instance.state == False) and (auto_state is True):
|
if (self.kettle.instance is None or self.kettle.instance.state == False) and (auto_state is True):
|
||||||
await self.cbpi.kettle.toggle(self.kettle.id)
|
await self.cbpi.kettle.toggle(self.kettle.id)
|
||||||
elif (self.kettle.instance.state == True) and (auto_state is False):
|
elif (self.kettle.instance.state == True) and (auto_state is False):
|
||||||
await self.kettle.instance.stop()
|
await self.cbpi.kettle.stop(self.kettle.id)
|
||||||
await self.push_update()
|
await self.push_update()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -436,7 +436,7 @@ class BoilStep(CBPiStep):
|
||||||
if (self.kettle.instance is None or self.kettle.instance.state == False) and (auto_state is True):
|
if (self.kettle.instance is None or self.kettle.instance.state == False) and (auto_state is True):
|
||||||
await self.cbpi.kettle.toggle(self.kettle.id)
|
await self.cbpi.kettle.toggle(self.kettle.id)
|
||||||
elif (self.kettle.instance.state == True) and (auto_state is False):
|
elif (self.kettle.instance.state == True) and (auto_state is False):
|
||||||
await self.kettle.instance.stop()
|
await self.cbpi.kettle.stop(self.kettle.id)
|
||||||
await self.push_update()
|
await self.push_update()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in a new issue