We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb20881 commit e569955Copy full SHA for e569955
1 file changed
PyPortal_UV_Index/code.py
@@ -85,9 +85,13 @@ def extract_date(date_time):
85
print('Retrying in 10 minutes')
86
time.sleep(600)
87
continue
88
- data = [{'hour': extract_hour(d['DATE_TIME']), 'value': int(d['UV_VALUE'])}
89
- for d in raw_data
90
- if d['UV_VALUE'] > 0]
+ data = []
+ for d in raw_data:
+ if d['UV_VALUE'] > 0:
91
+ entry = {}
92
+ entry['hour'] = extract_hour(d['DATE_TIME'])
93
+ entry['value'] = int(d['UV_VALUE'])
94
+ data.append(entry)
95
the_day = raw_data[0]['DATE_TIME']
96
pyportal.set_caption('UV Index for {0}'.format(extract_date(the_day)),
97
(80, 20),
0 commit comments