Add ntfy authentication

This commit is contained in:
Mike Cifelli 2023-07-03 14:11:10 -04:00
parent ae09bcc008
commit 4704023e96
Signed by: mike
GPG Key ID: 6B08C6BE47D08E4C
2 changed files with 4 additions and 2 deletions

View File

@ -9,5 +9,6 @@ secrets = {
'adafruit_io_username': '', 'adafruit_io_username': '',
'adafruit_io_key': '', 'adafruit_io_key': '',
'ntfy_host': '', 'ntfy_host': '',
'ntfy_topic': '' 'ntfy_topic': '',
'ntfy_auth': ''
} }

View File

@ -11,7 +11,8 @@ class Ntfy:
host = secrets['ntfy_host'] host = secrets['ntfy_host']
topic = secrets['ntfy_topic'] topic = secrets['ntfy_topic']
self.url = f'https://{host}/{topic}' auth = secrets['ntfy_auth']
self.url = f'https://{host}/{topic}?auth={auth}'
def message(self, message): def message(self, message):
result = self.sendMessage(message) result = self.sendMessage(message)