Skip to content

Commit

Permalink
fix: Fix non-update of description and due date
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerSelwyn committed Jan 3, 2024
1 parent f60ccc9 commit dda07d4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions custom_components/o365/todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,17 @@ async def async_update_todo_item(self, item: TodoItem) -> None:
o365_task = await self.hass.async_add_executor_job(
self.todolist.get_task, item.uid
)
if item.summary and item.summary != o365_task.subject:
if (
(item.summary and item.summary != o365_task.subject)
or (item.description and item.description != o365_task.body)
or (item.due and item.due != o365_task.due)
):
await self.async_update_todo(
todo_id=item.uid, subject=item.summary, o365_task=o365_task
todo_id=item.uid,
subject=item.summary,
description=item.description,
due=item.due,
o365_task=o365_task,
)
if item.status:
completed = None
Expand Down

0 comments on commit dda07d4

Please sign in to comment.