diff --git a/homeassistant/components/calendar/todoist.py b/homeassistant/components/calendar/todoist.py index b5eaed4e6c9..a0a3457667f 100644 --- a/homeassistant/components/calendar/todoist.py +++ b/homeassistant/components/calendar/todoist.py @@ -518,6 +518,8 @@ class TodoistProjectData: def update(self): """Get the latest data.""" if self._id is None: + self._api.reset_state() + self._api.sync() project_task_data = [ task for task in self._api.state[TASKS] if not self._project_id_whitelist or @@ -527,6 +529,7 @@ class TodoistProjectData: # If we have no data, we can just return right away. if not project_task_data: + _LOGGER.debug("No data for %s", self._name) self.event = None return True @@ -541,6 +544,8 @@ class TodoistProjectData: if not project_tasks: # We had no valid tasks + _LOGGER.debug("No valid tasks for %s", self._name) + self.event = None return True # Make sure the task collection is reset to prevent an