additional logging info

This commit is contained in:
avollkopf 2023-03-25 12:44:28 +01:00
parent 5bc5259bc3
commit 9257b95e37
3 changed files with 9 additions and 9 deletions

View file

@ -1,3 +1,3 @@
__version__ = "4.1.7.a7" __version__ = "4.1.7.a8"
__codename__ = "Groundhog Day" __codename__ = "Groundhog Day"

View file

@ -89,10 +89,10 @@ class MQTTSensor(CBPiSensor):
kettlestatus=False kettlestatus=False
if kettlestatus: if kettlestatus:
self.log_data(self.value) self.log_data(self.value)
logging.info("Kettle Active") logging.info("MQTTSensor {} Kettle Active".format(self.sensor.name))
self.lastlog = time.time() self.lastlog = time.time()
else: else:
logging.info("Kettle Inactive") logging.info("MQTTSensor {} Kettle Inactive".format(self.sensor.name))
if now >= self.lastlog + self.reducedfrequency: if now >= self.lastlog + self.reducedfrequency:
self.log_data(self.value) self.log_data(self.value)
self.lastlog = time.time() self.lastlog = time.time()
@ -106,10 +106,10 @@ class MQTTSensor(CBPiSensor):
fermenterstatus=False fermenterstatus=False
if fermenterstatus: if fermenterstatus:
self.log_data(self.value) self.log_data(self.value)
logging.info("Fermenter Active") logging.info("MQTTSensor {} Fermenter Active".format(self.sensor.name))
self.lastlog = time.time() self.lastlog = time.time()
else: else:
logging.info("Fermenter Inactive") logging.info("MQTTSensor {} Fermenter Inactive".format(self.sensor.name))
if now >= self.lastlog + self.reducedfrequency: if now >= self.lastlog + self.reducedfrequency:
self.log_data(self.value) self.log_data(self.value)
self.lastlog = time.time() self.lastlog = time.time()

View file

@ -128,10 +128,10 @@ class OneWire(CBPiSensor):
kettlestatus=False kettlestatus=False
if kettlestatus: if kettlestatus:
self.log_data(self.value) self.log_data(self.value)
logging.info("Kettle Active") logging.info("OneWire {} Kettle Active".format(self.sensor.name))
self.lastlog = time.time() self.lastlog = time.time()
else: else:
logging.info("Kettle Inactive") logging.info("OneWire {} Kettle Inactive".format(self.sensor.name))
if now >= self.lastlog + self.reducedfrequency: if now >= self.lastlog + self.reducedfrequency:
self.log_data(self.value) self.log_data(self.value)
self.lastlog = time.time() self.lastlog = time.time()
@ -145,10 +145,10 @@ class OneWire(CBPiSensor):
fermenterstatus=False fermenterstatus=False
if fermenterstatus: if fermenterstatus:
self.log_data(self.value) self.log_data(self.value)
logging.info("Fermenter Active") logging.info("OneWire {} Fermenter Active".format(self.sensor.name))
self.lastlog = time.time() self.lastlog = time.time()
else: else:
logging.info("Fermenter Inactive") logging.info("OneWire {} Fermenter Inactive".format(self.sensor.name))
if now >= self.lastlog + self.reducedfrequency: if now >= self.lastlog + self.reducedfrequency:
self.log_data(self.value) self.log_data(self.value)
self.lastlog = time.time() self.lastlog = time.time()