Skip to content

Commit 6dad80c

Browse files
authored
Clear holiday_list before updating
1 parent 68e2f1e commit 6dad80c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

custom_components/calendarific/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def update(self):
122122
self._next_holidays = response['response']['holidays']
123123
self._lastupdated = datetime.now().date()
124124
global holiday_list
125+
holiday_list = []
125126
for holiday in self._holidays:
126127
holiday_list.append(holiday['name'])
127128

@@ -146,4 +147,4 @@ def holidays(self, parameters):
146147
if 'error' not in data:
147148
data['error'] = 'Unknown error.'
148149

149-
return data
150+
return data

0 commit comments

Comments
 (0)