irm-kmi-api/irm_kmi_api/const.py

40 lines
No EOL
1.1 KiB
Python

from typing import Final
from .data import IrmKmiConditionEvol, IrmKmiRadarStyle, IrmKmiPollenLevels
POLLEN_LEVEL_TO_COLOR = {
'null': IrmKmiPollenLevels.GREEN,
'low': IrmKmiPollenLevels.YELLOW,
'moderate': IrmKmiPollenLevels.ORANGE,
'high': IrmKmiPollenLevels.RED,
'very high': IrmKmiPollenLevels.PURPLE,
'active': IrmKmiPollenLevels.ACTIVE
}
WEEKDAYS = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
STYLE_TO_PARAM_MAP: Final = {
IrmKmiRadarStyle.OPTION_STYLE_STD: 1,
IrmKmiRadarStyle.OPTION_STYLE_CONTRAST: 2,
IrmKmiRadarStyle.OPTION_STYLE_YELLOW_RED: 3,
IrmKmiRadarStyle.OPTION_STYLE_SATELLITE: 4
}
MAP_WARNING_ID_TO_SLUG: Final = {
0: 'wind',
1: 'rain',
2: 'ice_or_snow',
3: 'thunder',
7: 'fog',
9: 'cold',
12: 'thunder_wind_rain',
13: 'thunderstorm_strong_gusts',
14: 'thunderstorm_large_rainfall',
15: 'storm_surge',
17: 'coldspell'}
WWEVOL_TO_ENUM_MAP: Final = {
None: IrmKmiConditionEvol.STABLE,
0: IrmKmiConditionEvol.ONE_WAY,
1: IrmKmiConditionEvol.TWO_WAYS
}