mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-25 00:18:17 +01:00
set default for mqtt sensor to 999 and add check to fermentersteps target temp step
This commit is contained in:
parent
bce0a0025b
commit
a136f6b467
3 changed files with 4 additions and 4 deletions
|
@ -1 +1 @@
|
|||
__version__ = "4.0.2.0.a13"
|
||||
__version__ = "4.0.2.0.a14"
|
||||
|
|
|
@ -113,7 +113,7 @@ class FermenterTargetTempStep(CBPiFermentationStep):
|
|||
logging.info("warmup")
|
||||
while self.running == True:
|
||||
sensor_value = self.get_sensor_value(self.props.get("Sensor", None)).get("value")
|
||||
if sensor_value >= self.fermenter.target_temp and self.timer.is_running is not True:
|
||||
if sensor_value < 900 and sensor_value >= self.fermenter.target_temp and self.timer.is_running is not True:
|
||||
self.timer.start()
|
||||
self.timer.is_running = True
|
||||
await asyncio.sleep(1)
|
||||
|
@ -121,7 +121,7 @@ class FermenterTargetTempStep(CBPiFermentationStep):
|
|||
logging.info("Cooldown")
|
||||
while self.running == True:
|
||||
sensor_value = self.get_sensor_value(self.props.get("Sensor", None)).get("value")
|
||||
if sensor_value <= self.fermenter.target_temp and self.timer.is_running is not True:
|
||||
if sensor_value < 900 and sensor_value <= self.fermenter.target_temp and self.timer.is_running is not True:
|
||||
self.timer.start()
|
||||
self.timer.is_running = True
|
||||
await asyncio.sleep(1)
|
||||
|
|
|
@ -18,7 +18,7 @@ class MQTTSensor(CBPiSensor):
|
|||
if self.payload_text != None:
|
||||
self.payload_text = self.payload_text.split('.')
|
||||
self.mqtt_task = self.cbpi.satellite.subcribe(self.Topic, self.on_message)
|
||||
self.value: int = 0
|
||||
self.value: int = 999
|
||||
|
||||
async def on_message(self, message):
|
||||
val = json.loads(message)
|
||||
|
|
Loading…
Reference in a new issue