Account for 0 uv index
This commit is contained in:
parent
8733e2d1bc
commit
6837265efe
1 changed files with 2 additions and 1 deletions
|
@ -2,13 +2,14 @@ import requests
|
|||
from theme import current_theme, default
|
||||
|
||||
# WHO values
|
||||
# 0: No Sunlight so treat as low
|
||||
# 1-2: Low
|
||||
# 3-5: Moderate
|
||||
# 6-7: High
|
||||
# 8-10: Very High
|
||||
# 11+: Extreme
|
||||
uv_index = {
|
||||
0: current_theme.green,
|
||||
-1: current_theme.green, # -1 allows for UV Index of 0
|
||||
2: current_theme.yellow,
|
||||
5: current_theme.orange,
|
||||
7: current_theme.red,
|
||||
|
|
Loading…
Add table
Reference in a new issue