mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-10 01:17:42 +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")
|
logging.info("warmup")
|
||||||
while self.running == True:
|
while self.running == True:
|
||||||
sensor_value = self.get_sensor_value(self.props.get("Sensor", None)).get("value")
|
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.start()
|
||||||
self.timer.is_running = True
|
self.timer.is_running = True
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
@ -121,7 +121,7 @@ class FermenterTargetTempStep(CBPiFermentationStep):
|
||||||
logging.info("Cooldown")
|
logging.info("Cooldown")
|
||||||
while self.running == True:
|
while self.running == True:
|
||||||
sensor_value = self.get_sensor_value(self.props.get("Sensor", None)).get("value")
|
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.start()
|
||||||
self.timer.is_running = True
|
self.timer.is_running = True
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
|
|
@ -18,7 +18,7 @@ class MQTTSensor(CBPiSensor):
|
||||||
if self.payload_text != None:
|
if self.payload_text != None:
|
||||||
self.payload_text = self.payload_text.split('.')
|
self.payload_text = self.payload_text.split('.')
|
||||||
self.mqtt_task = self.cbpi.satellite.subcribe(self.Topic, self.on_message)
|
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):
|
async def on_message(self, message):
|
||||||
val = json.loads(message)
|
val = json.loads(message)
|
||||||
|
|
Loading…
Reference in a new issue