mirror of
https://github.com/Manuel83/craftbeerpi3
synced 2026-08-10 02:55:27 +02:00
-fix beer xml
-fix fermenter hysteresis
This commit is contained in:
@@ -6,10 +6,10 @@ from modules.core.props import Property
|
||||
@cbpi.fermentation_controller
|
||||
class Hysteresis(FermenterController):
|
||||
|
||||
heater_offset_min = Property.Number("Heater Offset min", True, 0)
|
||||
heater_offset_max = Property.Number("Heater Offset max", True, 0)
|
||||
cooler_offset_min = Property.Number("Cooler Offset min", True, 0)
|
||||
cooler_offset_max = Property.Number("Cooler Offset max", True, 0)
|
||||
heater_offset_min = Property.Number("Heater Offset ON", True, 0)
|
||||
heater_offset_max = Property.Number("Heater Offset OFF", True, 0)
|
||||
cooler_offset_min = Property.Number("Cooler Offset OFF", True, 0)
|
||||
cooler_offset_max = Property.Number("Cooler Offset ON", True, 0)
|
||||
|
||||
def stop(self):
|
||||
super(FermenterController, self).stop()
|
||||
@@ -23,16 +23,16 @@ class Hysteresis(FermenterController):
|
||||
target_temp = self.get_target_temp()
|
||||
temp = self.get_temp()
|
||||
|
||||
if temp + float(self.heater_offset_min) < target_temp:
|
||||
if temp + float(self.heater_offset_min) <= target_temp:
|
||||
self.heater_on(100)
|
||||
|
||||
if temp + float(self.heater_offset_max) > target_temp:
|
||||
if temp + float(self.heater_offset_max) >= target_temp:
|
||||
self.heater_off()
|
||||
|
||||
if temp > target_temp + float(self.cooler_offset_min):
|
||||
if temp >= target_temp + float(self.cooler_offset_min):
|
||||
self.cooler_on(100)
|
||||
|
||||
if temp < target_temp + float(self.cooler_offset_max):
|
||||
if temp <= target_temp + float(self.cooler_offset_max):
|
||||
self.cooler_off()
|
||||
|
||||
self.sleep(1)
|
||||
|
||||
Reference in New Issue
Block a user