From eef532e46c7fcd944ac9d98ec1c2f1852289d360 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Sat, 26 Feb 2022 14:45:41 -0500 Subject: [PATCH] Added Todoist integration and custom card --- configuration.yaml | 15 +++++++++++++++ sensor.yaml | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/configuration.yaml b/configuration.yaml index 18a1572..a99d617 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -100,6 +100,14 @@ calendar: username: !secret userIcloud password: !secret passIcloud url: https://caldav.icloud.com + - platform: todoist + token: !secret todoist_api_token + custom_projects: + - name: 'All Projects' + - name: 'Due Today' + due_date_days: 0 + - name: 'Due This Week' + due_date_days: 7 device_tracker: - platform: icloud3 @@ -154,3 +162,10 @@ notify: - service: mobile_app_kallen_iphone - service: mobile_app_tony_s_ipad - service: mobile_app_tony_s_iphone + +rest_command: + todoist: + method: post + url: 'https://api.todoist.com/sync/v8/sync' + payload: !secret todoist_api_payload + content_type: 'application/x-www-form-urlencoded' diff --git a/sensor.yaml b/sensor.yaml index dbd534e..d073d3c 100644 --- a/sensor.yaml +++ b/sensor.yaml @@ -41,3 +41,14 @@ days: 7 entities: - sensor.kdfi_wind_speed +- platform: rest + name: Household Tasks + method: GET + resource: 'https://api.todoist.com/sync/v8/projects/get_data' + params: + token: !secret todoist_api_token + project_id: 2285967928 + value_template: '{{value_json[''project''][''id'']}}' + json_attributes: + - items + scan_interval: 30