Add authentication to ntfy
This commit is contained in:
parent
3f965f7669
commit
ab5c6d6afa
|
@ -9,3 +9,4 @@ lon=lon
|
|||
uri=uri
|
||||
ntfy=ntfy.sh
|
||||
topic=topic
|
||||
auth=auth
|
||||
|
|
|
@ -11,8 +11,9 @@ class GarageListener:
|
|||
|
||||
ntfy = config['garage'].get('ntfy')
|
||||
topic = config['garage'].get('topic')
|
||||
auth = config['garage'].get('auth')
|
||||
|
||||
self.ntfyUri = f'https://{ntfy}/{topic}/json'
|
||||
self.ntfyUri = f'https://{ntfy}/{topic}/json?auth={auth}'
|
||||
|
||||
def listenForNotifications(self, queue):
|
||||
with requests.get(self.ntfyUri, stream=True, timeout=60) as response:
|
||||
|
|
Loading…
Reference in New Issue