From b1f0d91d75c72b606f3524f8a0eab186750bd86c Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Mon, 3 Jul 2023 12:23:34 -0400 Subject: [PATCH] Add authentication to ntfy --- garage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/garage.py b/garage.py index 49d9fab..9589388 100644 --- a/garage.py +++ b/garage.py @@ -16,6 +16,7 @@ eastPin = config['garage'].getint('east-pin') westPin = config['garage'].getint('west-pin') ntfy = config['push'].get('ntfy') topic = config['push'].get('topic') +auth = config['push'].get('auth') def main(): @@ -70,7 +71,7 @@ def persistState(): def sendNotification(): requests.post( - url=f'https://{ntfy}/{topic}', + url=f'https://{ntfy}/{topic}?auth={auth}', data='update'.encode(encoding='utf-8') )