diff --git a/custom_components/pronote/coordinator.py b/custom_components/pronote/coordinator.py index 88aa1e5..3f34faf 100644 --- a/custom_components/pronote/coordinator.py +++ b/custom_components/pronote/coordinator.py @@ -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: