mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-21 14:38:15 +01:00
test
This commit is contained in:
parent
1fcbe91e09
commit
5cbc7e1393
1 changed files with 9 additions and 10 deletions
|
@ -61,16 +61,9 @@ class OneWire(CBPiSensor):
|
|||
def __init__(self, cbpi, id, props):
|
||||
super(OneWire, self).__init__(cbpi, id, props)
|
||||
self.value = 200
|
||||
|
||||
async def start(self):
|
||||
await super().start()
|
||||
self.name = self.props.get("Sensor")
|
||||
self.interval = int(self.props.get("Interval", 60))
|
||||
self.offset = float(self.props.get("offset",0))
|
||||
self.reducedfrequency=int(self.props.get("ReducedLogging", 60))
|
||||
self.lastlog=0
|
||||
self.sensor=self.get_sensor(self.id)
|
||||
self.reducedfrequency=int(self.props.get("ReducedLogging", 60))
|
||||
|
||||
self.kettleid=self.props.get("Kettle", None)
|
||||
self.fermenterid=self.props.get("Fermenter", None)
|
||||
self.reducedlogging=True if self.kettleid or self.fermenterid else False
|
||||
|
@ -85,6 +78,11 @@ class OneWire(CBPiSensor):
|
|||
self.kettle = self.get_kettle(self.kettleid) if self.kettleid is not None else None
|
||||
self.fermenter = self.get_fermenter(self.fermenterid) if self.fermenterid is not None else None
|
||||
|
||||
async def start(self):
|
||||
await super().start()
|
||||
self.name = self.props.get("Sensor")
|
||||
self.interval = int(self.props.get("Interval", 60))
|
||||
self.offset = float(self.props.get("offset",0))
|
||||
|
||||
self.t = ReadThread(self.name)
|
||||
self.t.daemon = True
|
||||
|
@ -122,6 +120,7 @@ class OneWire(CBPiSensor):
|
|||
|
||||
async def logvalue(self):
|
||||
now=time.time()
|
||||
logging.info("OneWire {} logging subroutine".format(self.sensor.name))
|
||||
if self.kettle is not None:
|
||||
try:
|
||||
kettlestatus=self.kettle.instance.state
|
||||
|
|
Loading…
Reference in a new issue