From c7fcdfe9b43f3f87eafa6346f326a62fa2a3f2f9 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Wed, 15 Feb 2023 09:12:05 +0100 Subject: [PATCH] Bug-Fix: Warning messages on pure RX content eliminated --- function/videv.py | 5 ++++- report | 2 +- smart_brain.py | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/function/videv.py b/function/videv.py index d06d9fa..ef7ce35 100644 --- a/function/videv.py +++ b/function/videv.py @@ -36,6 +36,8 @@ class base(mqtt_base): """ listen to data changes of ext_device and update videv information """ + if my_key not in self.keys(): + self[my_key] = None if ext_device.__class__.__name__ == "group": # store information to identify callback from ext_device self.__display_dict__[(id(ext_device[0]), ext_key)] = my_key @@ -66,7 +68,8 @@ class base(mqtt_base): """ listen to videv information and pass data to ext_device """ - self[my_key] = None + if my_key not in self.keys(): + self[my_key] = None # store information to identify callback from videv self.__control_dict__[my_key] = (ext_device, ext_key, on_change_only) # add callback for videv changes diff --git a/report b/report index e2392c9..b53dd30 160000 --- a/report +++ b/report @@ -1 +1 @@ -Subproject commit e2392c9f28d88ee54463681850acf95ae496c9a0 +Subproject commit b53dd30eae1d679b7eec4999bec50aed55bc105b diff --git a/smart_brain.py b/smart_brain.py index 32e33cb..b806985 100644 --- a/smart_brain.py +++ b/smart_brain.py @@ -14,7 +14,7 @@ logger = logging.getLogger(config.APP_NAME) VERS_MAJOR = 1 VERS_MINOR = 2 -VERS_PATCH = 0 +VERS_PATCH = 1 INFO_TOPIC = "__info__" INFO_DATA = { @@ -40,7 +40,8 @@ def __info_publisher__(client, userdata, message): if __name__ == "__main__": if config.DEBUG: - report.appLoggingConfigure(None, None, ((config.APP_NAME, logging.DEBUG), ), fmt=report.SHORT_FMT, host='localhost', port=19996) + report.appLoggingConfigure(None, 'stdout', ((config.APP_NAME, logging.DEBUG), ), + target_level=logging.WARNING, fmt=report.SHORT_FMT, host='localhost', port=19996) else: report.stdoutLoggingConfigure(((config.APP_NAME, logging.WARNING), ), report.SHORT_FMT) #