Add UV Index support (one-line format)

pull/747/head
Igor Chubin 2 years ago
parent 6242706950
commit 3cbf7a9349

@ -186,6 +186,7 @@ To specify your own custom output format, use the special `%`-notation:
M Moon day,
p Precipitation (mm/3 hours),
P Pressure (hPa),
u UV index (1-12),
D Dawn*,
S Sunrise*,

@ -167,6 +167,14 @@ def render_pressure(data, query):
answer += 'hPa'
return answer
def render_uv_index(data, query):
"""
UV Index (u)
"""
answer = data.get('uvIndex', '')
return answer
def render_wind(data, query):
"""
wind (w)
@ -284,6 +292,7 @@ FORMAT_SYMBOL = {
'p': render_precipitation,
'o': render_precipitation_chance,
'P': render_pressure,
"u": render_uv_index,
}
FORMAT_SYMBOL_ASTRO = {

Loading…
Cancel
Save