Based on the documentation here and all Zabbix releases API documentation.
I have a lookup table like below
PRIORITY_MAP = {}
PRIORITY_MAP[0] = 'not classified'
PRIORITY_MAP[1] = 'information'
PRIORITY_MAP[2] = 'warning'
PRIORITY_MAP[3] = 'average'
PRIORITY_MAP[4] = 'high'
PRIORITY_MAP[5] = 'disaster'
The problem is the returned trigger "priority" value doesn't match the above table or documentation. For example i have a trigger that is configured as 'HIGH' severity, when triggered it gives me priority = `3`. So it wrongly translates as 'AVERAGE'. When i change the trigger to 'LOW' the priority value returned is '1'.
When i create a trigger i have the following options
Information
Low
Warning
High
Very High
Disaster
Which makes me think my code should be
PRIORITY_MAP = {}
PRIORITY_MAP[0] = 'Information'
PRIORITY_MAP[1] = 'Low'
PRIORITY_MAP[2] = 'Warning'
PRIORITY_MAP[3] = 'High'
PRIORITY_MAP[4] = 'Very High'
PRIORITY_MAP[5] = 'Disaster'
So the documentation for API "Trigger object" is wrong, should be
Severity of the trigger. Possible values are: 0 - information; 1 - low; 2 - warning; 3 - high; 4 - very high; 5 - disaster.