Add ntfy authentication
This commit is contained in:
parent
ae09bcc008
commit
4704023e96
|
@ -9,5 +9,6 @@ secrets = {
|
|||
'adafruit_io_username': '',
|
||||
'adafruit_io_key': '',
|
||||
'ntfy_host': '',
|
||||
'ntfy_topic': ''
|
||||
'ntfy_topic': '',
|
||||
'ntfy_auth': ''
|
||||
}
|
||||
|
|
|
@ -11,7 +11,8 @@ class Ntfy:
|
|||
|
||||
host = secrets['ntfy_host']
|
||||
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):
|
||||
result = self.sendMessage(message)
|
||||
|
|
Loading…
Reference in New Issue