Fix Pushover parsing of integer priorities (#598)

This commit is contained in:
Sylvain Pasche 2022-06-03 19:52:44 +02:00 committed by GitHub
parent aaf0aea668
commit 62edc52871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -571,14 +571,14 @@ class NotifyPushover(NotifyBase):
'h': PushoverPriority.HIGH,
'e': PushoverPriority.EMERGENCY,
# Entries to additionally support (so more like PushOver's API
# Entries to additionally support (so more like PushOver's API)
'-2': PushoverPriority.LOW,
'-1': PushoverPriority.MODERATE,
'0': PushoverPriority.NORMAL,
'1': PushoverPriority.HIGH,
'2': PushoverPriority.EMERGENCY,
}
priority = results['qsd']['priority'][0].lower()
priority = results['qsd']['priority'].lower()
results['priority'] = \
next((
v for k, v in _map.items() if priority.startswith(k)),