Todoist card for Home Assistant Lovelace UI. This card displays items from selected Todoist project.
This card is available as a custom repository in HACS (Home Assistant Community Store).
- Download
todoist-card.js
file from the latest-release. - Put
todoist-card.js
file into yourconfig/www
folder. - Add a reference to
todoist-card.js
in Lovelace. There's two way to do that:- Using UI: Configuration → Lovelace Dashboards → Resources → Click Plus button → Set Url as
/local/todoist-card.js
→ Set Resource type asJavaScript Module
. - Using YAML: Add the following code to
lovelace
section.resources: - url: /local/todoist-card.js type: module
- Using UI: Configuration → Lovelace Dashboards → Resources → Click Plus button → Set Url as
- Add
custom:todoist-card
to Lovelace UI as any other card (using either editor or YAML configuration).
This card can be configured using Lovelace UI editor.
- Add the following code to
configuration.yaml
:sensor: - platform: rest name: To-do List method: GET resource: 'https://api.todoist.com/sync/v8/projects/get_data' params: token: !secret todoist_api_token project_id: TODOIST_PROJECT_ID value_template: '{{value_json[''project''][''id'']}}' json_attributes: - items scan_interval: 30 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'
- ... and to
secrets.yaml
:todoist_api_token: TODOIST_API_TOKEN todoist_api_payload: token=TODOIST_API_TOKEN&commands={{commands}}
- Replace
TODOIST_API_TOKEN
with your token andTODOIST_PROJECT_ID
with ID of your selected Todoist project.Your can get
TODOIST_PROJECT_ID
from project URL, which usually looks like this:https://todoist.com/app/project/TODOIST_PROJECT_ID
- Reload configs or restart Home Assistant.
- In Lovelace UI, click 3 dots in top left corner.
- Click Edit Dashboard.
- Click Add Card button in the bottom right corner to add a new card.
- Find Custom: Todoist Card in the list.
- Choose
entity
. - Now you should see the preview of the card!
Typical example of using this card in YAML config would look like this:
type: 'custom:todoist-card'
entity: sensor.to_do_list
show_header: true
only_today_overdue: false
Here is what every option means:
Name | Type | Default | Description |
---|---|---|---|
type |
string |
required | custom:todoist-card |
entity |
string |
required | An entity_id within the sensor domain. |
show_header |
boolean |
true |
Show friendly name of the selected sensor in the card header. |
only_today_overdue |
boolean |
false |
Only show tasks that are overdue or due today. |
- Circle marks selected task as completed.
- Trash bin deletes selected task.
- Input adds new item to the list after pressing
Enter
.
MIT © Konstantin Grinkevich