Skip to content

Commit 33d588c

Browse files
authored
Merge pull request adafruit#1007 from adafruit/pyPortalTitanoWeatherUpdate
Updating openweather_graphics.py
2 parents 191ee82 + c810e0f commit 33d588c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

PyPortal_Titano_Weather_Station/openweather_graphics.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ def update_date(self):
147147
holiday_date_str = month+shortened_date_format_str % (date)
148148
print(date_str)
149149
self.date_text.text = date_str
150-
if not self.holiday_text:
151-
self.holiday_text = Label(self.medium_font, max_glyphs=60)
152-
self.holiday_text.x = 10
153-
self.holiday_text.y = 45
154-
self.holiday_text.color = 0xf2f89d
155-
self._text_group.append(self.holiday_text)
156150
for i in holiday_checks:
157151
h = holiday_checks.index(i)
158152
if holiday_date_str == holiday_checks[h]:
153+
if not self.holiday_text:
154+
self.holiday_text = Label(self.medium_font, max_glyphs=60)
155+
self.holiday_text.x = 10
156+
self.holiday_text.y = 45
157+
self.holiday_text.color = 0xf2f89d
158+
self._text_group.append(self.holiday_text)
159159
self.holiday_text.text = holiday_greetings[h]
160160

161161
def set_icon(self, filename):

0 commit comments

Comments
 (0)