From f23371429e94b39c34b9e4f270fca37730b23054 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Mon, 22 Aug 2022 20:30:42 -0400 Subject: [PATCH] Updated for new Todoist API version --- configuration.yaml | 2 +- sensors/tasks.yaml | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/configuration.yaml b/configuration.yaml index 84b70bc..888fbab 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -61,7 +61,7 @@ calendar: rest_command: todoist: method: post - url: 'https://api.todoist.com/sync/v8/sync' + url: 'https://api.todoist.com/sync/v9/{{ url }}' payload: !secret todoist_api_payload content_type: 'application/x-www-form-urlencoded' diff --git a/sensors/tasks.yaml b/sensors/tasks.yaml index ff3051f..ed6b84f 100644 --- a/sensors/tasks.yaml +++ b/sensors/tasks.yaml @@ -1,33 +1,36 @@ - platform: rest name: Household Tasks method: GET - resource: 'https://api.todoist.com/sync/v8/projects/get_data' + resource: 'https://api.todoist.com/sync/v9/projects/get_data' params: token: !secret todoist_api_token project_id: 2285967928 value_template: '{{value_json[''project''][''id'']}}' json_attributes: + - project - items scan_interval: 30 - platform: rest name: Kallen Tasks method: GET - resource: 'https://api.todoist.com/sync/v8/projects/get_data' + resource: 'https://api.todoist.com/sync/v9/projects/get_data' params: token: !secret todoist_api_token project_id: 2285969005 value_template: '{{value_json[''project''][''id'']}}' json_attributes: + - project - items scan_interval: 30 - platform: rest name: Home Tech method: GET - resource: 'https://api.todoist.com/sync/v8/projects/get_data' + resource: 'https://api.todoist.com/sync/v9/projects/get_data' params: token: !secret todoist_api_token project_id: 2285967948 value_template: '{{value_json[''project''][''id'']}}' json_attributes: + - project - items scan_interval: 30 \ No newline at end of file