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
|
from theme import current_theme, default
|
||||||
|
|
||||||
# WHO values
|
# WHO values
|
||||||
|
# 0: No Sunlight so treat as low
|
||||||
# 1-2: Low
|
# 1-2: Low
|
||||||
# 3-5: Moderate
|
# 3-5: Moderate
|
||||||
# 6-7: High
|
# 6-7: High
|
||||||
# 8-10: Very High
|
# 8-10: Very High
|
||||||
# 11+: Extreme
|
# 11+: Extreme
|
||||||
uv_index = {
|
uv_index = {
|
||||||
0: current_theme.green,
|
-1: current_theme.green, # -1 allows for UV Index of 0
|
||||||
2: current_theme.yellow,
|
2: current_theme.yellow,
|
||||||
5: current_theme.orange,
|
5: current_theme.orange,
|
||||||
7: current_theme.red,
|
7: current_theme.red,
|
||||||
|
|
Loading…
Add table
Reference in a new issue