added verbose option

This commit is contained in:
Michael Clemens 2020-12-08 10:48:00 +01:00
parent ef79d92fab
commit f99cfd7e4c

View File

@ -76,8 +76,8 @@ def on_mqtt(*args):
if duration >= cfg.min_duration: if duration >= cfg.min_duration:
if tg not in last_TG_activity or inactivity >= cfg.min_silence: if tg not in last_TG_activity or inactivity >= cfg.min_silence:
msg = construct_message(call) msg = construct_message(call)
# DEBUG else: elif cfg.verbose:
# DEBUG print("ignored activity in TG " + str(tg) + " from " + callsign + ": last action " + str(inactivity) + " seconds ago.") print("ignored activity in TG " + str(tg) + " from " + callsign + ": last action " + str(inactivity) + " seconds ago.")
last_TG_activity[tg] = now last_TG_activity[tg] = now
# finally write the message to the console and send a push notification # finally write the message to the console and send a push notification
if msg != "": if msg != "":