Adjustments for new Todoist API
This commit is contained in:
@@ -65,11 +65,11 @@ calendar:
|
|||||||
rest_command:
|
rest_command:
|
||||||
todoist:
|
todoist:
|
||||||
method: post
|
method: post
|
||||||
url: 'https://api.todoist.com/sync/v9/{{ url }}'
|
url: 'https://api.todoist.com/api/v1/{{ url }}'
|
||||||
payload: '{{ payload }}'
|
payload: '{{ payload }}'
|
||||||
headers:
|
headers:
|
||||||
Authorization: !secret todoist_api_token
|
Authorization: !secret todoist_api_token
|
||||||
content_type: 'application/x-www-form-urlencoded'
|
content_type: 'application/x-www-form-urlencoded'
|
||||||
|
|
||||||
recorder:
|
recorder:
|
||||||
db_url: !secret mariadb_url
|
db_url: !secret mariadb_url
|
||||||
|
|||||||
@@ -90,17 +90,33 @@ input_datetime:
|
|||||||
sensor:
|
sensor:
|
||||||
- platform: rest
|
- platform: rest
|
||||||
name: Kallen Tasks
|
name: Kallen Tasks
|
||||||
|
unique_id: 77045665-9222-4a6b-851f-6d9b50110107
|
||||||
method: GET
|
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:
|
params:
|
||||||
project_id: 2285969005
|
project_id: 2285969005
|
||||||
headers:
|
headers:
|
||||||
Authorization: !secret todoist_api_token
|
Authorization: !secret todoist_api_token
|
||||||
value_template: '{{value_json[''project''][''id'']}}'
|
Accept: application/json
|
||||||
|
value_template: '{{ value_json.results | length }}'
|
||||||
json_attributes:
|
json_attributes:
|
||||||
- project
|
- results
|
||||||
- items
|
scan_interval: 60
|
||||||
scan_interval: 30
|
|
||||||
|
|
||||||
automation:
|
automation:
|
||||||
- id: 94b57d79-efe0-4f34-b5e3-baeaa5eea9f4
|
- id: 94b57d79-efe0-4f34-b5e3-baeaa5eea9f4
|
||||||
|
|||||||
@@ -189,17 +189,32 @@ input_select:
|
|||||||
sensor:
|
sensor:
|
||||||
- platform: rest
|
- platform: rest
|
||||||
name: Home Tech
|
name: Home Tech
|
||||||
|
unique_id: 83f76f0c-d49c-407f-ad99-57d5896dac93
|
||||||
method: GET
|
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:
|
params:
|
||||||
project_id: 2285967948
|
project_id: 2285967948
|
||||||
headers:
|
headers:
|
||||||
Authorization: !secret todoist_api_token
|
Authorization: !secret todoist_api_token
|
||||||
value_template: '{{value_json[''project''][''id'']}}'
|
Accept: application/json
|
||||||
|
value_template: '{{ value_json.results | length }}'
|
||||||
json_attributes:
|
json_attributes:
|
||||||
- project
|
- results
|
||||||
- items
|
scan_interval: 60
|
||||||
scan_interval: 30
|
|
||||||
|
|
||||||
# template:
|
# template:
|
||||||
# - binary_sensor:
|
# - binary_sensor:
|
||||||
|
|||||||
Reference in New Issue
Block a user