Adjustments for new Todoist API
This commit is contained in:
@@ -65,7 +65,7 @@ calendar:
|
||||
rest_command:
|
||||
todoist:
|
||||
method: post
|
||||
url: 'https://api.todoist.com/sync/v9/{{ url }}'
|
||||
url: 'https://api.todoist.com/api/v1/{{ url }}'
|
||||
payload: '{{ payload }}'
|
||||
headers:
|
||||
Authorization: !secret todoist_api_token
|
||||
|
||||
@@ -90,17 +90,33 @@ input_datetime:
|
||||
sensor:
|
||||
- platform: rest
|
||||
name: Kallen Tasks
|
||||
unique_id: 77045665-9222-4a6b-851f-6d9b50110107
|
||||
method: GET
|
||||
resource: 'https://api.todoist.com/sync/v9/projects/get_data'
|
||||
resource: 'https://api.todoist.com/api/v1/projects/2285969005/full'
|
||||
headers:
|
||||
Authorization: !secret todoist_api_token
|
||||
Accept: application/json
|
||||
value_template: '{{ value_json.project.id }}'
|
||||
json_attributes:
|
||||
- project
|
||||
- tasks
|
||||
- sections
|
||||
scan_interval: 60
|
||||
|
||||
- platform: rest
|
||||
name: Kallen Tasks Comments
|
||||
unique_id: ae3178ad-439a-49f7-8c56-2fa866afaba5
|
||||
method: GET
|
||||
resource: 'https://api.todoist.com/api/v1/comments'
|
||||
params:
|
||||
project_id: 2285969005
|
||||
headers:
|
||||
Authorization: !secret todoist_api_token
|
||||
value_template: '{{value_json[''project''][''id'']}}'
|
||||
Accept: application/json
|
||||
value_template: '{{ value_json.results | length }}'
|
||||
json_attributes:
|
||||
- project
|
||||
- items
|
||||
scan_interval: 30
|
||||
- results
|
||||
scan_interval: 60
|
||||
|
||||
automation:
|
||||
- id: 94b57d79-efe0-4f34-b5e3-baeaa5eea9f4
|
||||
|
||||
@@ -189,17 +189,32 @@ input_select:
|
||||
sensor:
|
||||
- platform: rest
|
||||
name: Home Tech
|
||||
unique_id: 83f76f0c-d49c-407f-ad99-57d5896dac93
|
||||
method: GET
|
||||
resource: 'https://api.todoist.com/sync/v9/projects/get_data'
|
||||
resource: 'https://api.todoist.com/api/v1/projects/2285967948/full'
|
||||
headers:
|
||||
Authorization: !secret todoist_api_token
|
||||
value_template: '{{ value_json.project.id }}'
|
||||
json_attributes:
|
||||
- project
|
||||
- tasks
|
||||
- sections
|
||||
scan_interval: 60
|
||||
|
||||
- platform: rest
|
||||
name: Home Tech Comments
|
||||
unique_id: 93e6b1c1-8e92-423f-ad56-369e9bb86820
|
||||
method: GET
|
||||
resource: 'https://api.todoist.com/api/v1/comments'
|
||||
params:
|
||||
project_id: 2285967948
|
||||
headers:
|
||||
Authorization: !secret todoist_api_token
|
||||
value_template: '{{value_json[''project''][''id'']}}'
|
||||
Accept: application/json
|
||||
value_template: '{{ value_json.results | length }}'
|
||||
json_attributes:
|
||||
- project
|
||||
- items
|
||||
scan_interval: 30
|
||||
- results
|
||||
scan_interval: 60
|
||||
|
||||
# template:
|
||||
# - binary_sensor:
|
||||
|
||||
Reference in New Issue
Block a user