mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-22 06:58:17 +01:00
Another fix based now on a life Pi system
- fixed storage of femrenter_data.json -> Fermenters are in 'data' - fixed hysteresis
This commit is contained in:
parent
751b3dcad9
commit
ba42027e75
3 changed files with 6 additions and 9 deletions
|
@ -1 +1 @@
|
|||
__version__ = "4.0.1.a2"
|
||||
__version__ = "4.0.1.a3"
|
||||
|
|
|
@ -253,8 +253,9 @@ class FermentationController:
|
|||
#self.cbpi.push_update("cbpi/{}/update".format(self.update_key), list(map(lambda item: item.to_dict(), self.data)))
|
||||
|
||||
def save(self):
|
||||
data = dict(data=list(map(lambda item: item.to_dict(), self.data)))
|
||||
with open(self.path, "w") as file:
|
||||
json.dump(list(map(lambda item: item.to_dict(), self.data)), file, indent=4, sort_keys=True)
|
||||
json.dump(data, file, indent=4, sort_keys=True)
|
||||
|
||||
async def create_step(self, id, step: Step):
|
||||
try:
|
||||
|
|
|
@ -60,16 +60,12 @@ class FermenterHysteresis(CBPiFermenterLogic):
|
|||
self.fermenter = self.get_fermenter(self.id)
|
||||
self.heater = self.fermenter.heater
|
||||
self.cooler = self.fermenter.cooler
|
||||
|
||||
target_temp = self.get_fermenter_target_temp(self.id)
|
||||
if target_temp == 0:
|
||||
await self.set_fermenter_target_temp(self.id,int(self.props.get("TargetTemp", 0)))
|
||||
|
||||
|
||||
|
||||
while self.running == True:
|
||||
|
||||
sensor_value = self.get_sensor_value(self.fermenter.sensor).get("value")
|
||||
target_temp = self.get_fermenter_target_temp(self.id)
|
||||
sensor_value = float(self.get_sensor_value(self.fermenter.sensor).get("value"))
|
||||
target_temp = float(self.get_fermenter_target_temp(self.id))
|
||||
|
||||
if sensor_value + self.heater_offset_min <= target_temp:
|
||||
if self.heater:
|
||||
|
|
Loading…
Reference in a new issue