From a8ec65b3e47069a2e3aff582857cfad9d4d5e1e0 Mon Sep 17 00:00:00 2001 From: avollkopf <43980694+avollkopf@users.noreply.github.com> Date: Sat, 25 Mar 2023 12:56:37 +0100 Subject: [PATCH] update --- cbpi/__init__.py | 2 +- cbpi/extension/mqtt_sensor/__init__.py | 3 +-- cbpi/extension/onewire/__init__.py | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cbpi/__init__.py b/cbpi/__init__.py index 6375379..50436a0 100644 --- a/cbpi/__init__.py +++ b/cbpi/__init__.py @@ -1,3 +1,3 @@ -__version__ = "4.1.7.a8" +__version__ = "4.1.7.a9" __codename__ = "Groundhog Day" diff --git a/cbpi/extension/mqtt_sensor/__init__.py b/cbpi/extension/mqtt_sensor/__init__.py index c42de5a..b654e05 100644 --- a/cbpi/extension/mqtt_sensor/__init__.py +++ b/cbpi/extension/mqtt_sensor/__init__.py @@ -34,10 +34,9 @@ class MQTTSensor(CBPiSensor): 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.reducedlogging=True self.fermenterid=self.props.get("Fermenter", None) + self.reducedlogging=True if self.kettleid or self.fermenterid else False if self.kettleid is not None and self.fermenterid is not None: self.reducedlogging=False diff --git a/cbpi/extension/onewire/__init__.py b/cbpi/extension/onewire/__init__.py index 622cf82..ba42137 100644 --- a/cbpi/extension/onewire/__init__.py +++ b/cbpi/extension/onewire/__init__.py @@ -72,8 +72,8 @@ class OneWire(CBPiSensor): self.reducedfrequency=int(self.props.get("ReducedLogging", 60)) self.kettleid=self.props.get("Kettle", None) - self.reducedlogging=True self.fermenterid=self.props.get("Fermenter", None) + self.reducedlogging=True if self.kettleid or self.fermenterid else False if self.kettleid is not None and self.fermenterid is not None: self.reducedlogging=False @@ -115,6 +115,7 @@ class OneWire(CBPiSensor): if self.reducedlogging: await self.logvalue() else: + logging.info("OneWire {} regular logging".format(self.sensor.name)) self.log_data(self.value) self.lastlog = time.time() await asyncio.sleep(self.interval)