Skip to content

Commit

Permalink
fix(lessons): fix condition to check if tomorrow is a school day
Browse files Browse the repository at this point in the history
  • Loading branch information
delphiki committed May 31, 2024
1 parent d157c9a commit aef17b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/pronote/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async def _async_update_data(self) -> dict[Platform, dict[str, Any]]:
_LOGGER.debug(f"Lessons found at: {delta} days, for a maximum of {LESSON_MAX_DAYS} from today")
self.data['lessons_period'] = sorted(lessons_period, key=lambda lesson: lesson.start) if lessons_period is not None else None

if self.data['lessons_tomorrow'] is not None:
if self.data['lessons_tomorrow'] is not None and len(self.data['lessons_tomorrow']) > 0:
self.data['lessons_next_day'] = self.data['lessons_tomorrow']
else:
try:
Expand Down

0 comments on commit aef17b1

Please sign in to comment.