Services

These MS365 services must be targeted at a todo sensor. Alternatively the core To Do services (e.g.todo.add_item) can be used. The core services do not support reminder date/time setting. The intention is to phase out the MS365 services once the core services provide full functionality.

ms365_todo.new_todo

Create a new To Do task - All parameters are shown in the available parameter list on the Developer Tools/Services tab. The optional importance field accepts low, normal, or high. Omit it to use Microsoft To Do’s default importance.

ms365_todo.update_todo

Update a To Do task - All parameters are shown in the available parameter list on the Developer Tools/Services tab. The optional importance field accepts low, normal, or high. The value high marks the task as Important in Microsoft To Do. Omitting importance preserves its current value. Updating requires the integration’s update option and Microsoft Tasks.ReadWrite permission.

action: ms365_todo.update_todo
target:
  entity_id: todo.hass_primary
data:
  todo_id: todo_guid
  importance: high

ms365_todo.delete_todo

Delete a To Do task - All parameters are shown in the available parameter list on the Developer Tools/Services tab.

ms365_todo.complete_todo

(Un)complete a To Do task - All parameters are shown in the available parameter list on the Developer Tools/Services tab.

ms365_todo.new_todo_checklist_item

Create a new Checklist Item for an existing To Do task - All parameters are shown in the available parameter list on the Developer Tools/Services tab.

ms365_todo.update_todo_checklist_item

Rename a To Do Checklist Item (subtask), mark it complete/incomplete, or both. Supply todo_id, checklist_item_id, and at least one of name or status. When supplied, name must contain at least one character; it cannot be an empty string. Omitting status preserves the current completion state; omitting name preserves the current name. Existing status-only calls remain supported.

ms365_tododelete_todo_checklist_item

Delete a To Do Checklist Item - All parameters are shown in the available parameter list on the Developer Tools/Services tab.

ms365_todo.scan_for_todo_lists

Scan for new for To Do lists and add to ms365_todos.yaml - No parameters.

Example rename a subtask

Find todo_id and the checklist item’s id in the entity’s all_todos attribute (checklist_items contains the subtasks).

action: ms365_todo.update_todo_checklist_item
target:
  entity_id: todo.hass_primary
data:
  todo_id: todo_guid
  checklist_item_id: checklist_item_guid
  name: Go to the main post office

Add status: completed or status: needs_action to change completion in the same call. This action does not add nested subtask controls to Home Assistant’s built-in To-do list UI.

Example create To Do service call

service: ms365_todo.new_todo
target:
  entity_id: todo.hass_primary
data:
  subject: Pick up the mail
  description: Walk to the post box and collect the mail
  due: "2023-01-01"     # Note that due only takes a date, not a datetime
  reminder: 2023-01-01T12:00:00+0000

Example create To Do Check List Item service call

service: ms365_todo.new_todo
target:
  entity_id: todo.hass_primary
data:
  subject: Pick up the mail
  description: Walk to the post box and collect the mail
  due: "2023-01-01"     # Note that due only takes a date, not a datetime
  reminder: 2023-01-01T12:00:00+0000
action: ms365_todo.new_todo_checklist_item
target:
  entity_id: todo.new_hass
data:
  todo_id: >-
    todo_guid
  name: Go to post office

Response - Note item id is shown as an attribute of the entity_id since multiple entities can potentially be actioned at the same time.

todo.hass_primary:
  checklist_item_id: checklist_item_guid