From 059017e71afa69f6e63008be33ea1d766f562928 Mon Sep 17 00:00:00 2001 From: Antoine Date: Thu, 20 Oct 2022 09:57:06 +0100 Subject: [PATCH] Add EVENT_LEVEL comments to config file --- back/pialert.py | 4 ++-- config/pialert.conf | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/back/pialert.py b/back/pialert.py index 38295247..8ed834bb 100644 --- a/back/pialert.py +++ b/back/pialert.py @@ -1618,7 +1618,7 @@ def send_webhook (_json, _html): try: eventLevel = EVENT_LEVEL except NameError: # variable not defined, use a default - eventLevel = 4 # report on everythin + eventLevel = 4 # report on everything # use data type based on specified payload type if webhookPayload == 'json': @@ -1855,7 +1855,7 @@ def to_text(_json, eventLevel): payloadData += event[8] + " on " + event[1] + " " + event[3] + " at " + event[2] + "\n" return payloadData - + #=============================================================================== # BEGIN #=============================================================================== diff --git a/config/pialert.conf b/config/pialert.conf index 3adf33f7..13a626e6 100644 --- a/config/pialert.conf +++ b/config/pialert.conf @@ -40,7 +40,8 @@ WEBHOOK_URL = 'http://n8n.local:5555/webhook-test/aaaaaaaa-aaaa-aaaa # e.g.: for discord use 'html' WEBHOOK_PAYLOAD = 'json' WEBHOOK_REQUEST_METHOD = 'GET' # POST, GET... -EVENT_LEVEL = 5 +# set event level to 0 for no message, 1 for Internet changes only, 2 for new devices and 1, 3 for down devices and 2 and 4 for events and 3. i.e. everything +EVENT_LEVEL = 4 # Apprise settings #-----------------------