NTFY priority #553 🚑

This commit is contained in:
Jokob-sk
2024-02-03 07:45:57 +11:00
parent 853a7eebd0
commit d58af0f4e0
2 changed files with 16 additions and 1 deletions

View File

@@ -385,6 +385,21 @@
"language_code": "es_es",
"string" : "Ingrese la contraseña si necesita (host) una instancia con autenticación habilitada."
}]
},
{
"function": "PRIORITY",
"type": "text.select",
"default_value":"urgent",
"options": ["urgent", "high", "default" , "low" , "min" ],
"localized": ["name", "description"],
"name" : [{
"language_code": "en_us",
"string" : "Message priority"
}],
"description": [{
"language_code": "en_us",
"string" : "All NTFY messages have a priority, which defines how urgently your phone notifies you. On Android, you can set custom notification sounds and vibration patterns on your phone to map to these priorities (see <a href=\"https://docs.ntfy.sh/subscribe/phone/\">Android config</a>)."
}]
}
]
}

View File

@@ -88,7 +88,7 @@ def send(html, text):
headers = {
"Title": "Pi.Alert Notification",
"Actions": "view, Open Dashboard, "+ get_setting_value('REPORT_DASHBOARD_URL'),
"Priority": "urgent",
"Priority": get_setting_value('NTFY_PRIORITY'),
"Tags": "warning"
}