PowerTodoist-card: Lists, Kanbans, and much more [beta release]

Hi @pgr

This was a discussion we had on the original Todoist-List thread, but I’ve just created a new task and hoped to have it marked completed within the automation (will paste below how we’d done this previously) but it looks like Todoist has changed the arg from ID numbers to random characters. Would this still work?

  - data:
      url: sync
      payload: >-
        commands=[{ "type": "item_close",  "uuid": {{ range(1, 500) | random
        }},  "args": {"id": "6590698001"} }]      
    action: rest_command.todoist
    enabled: false

The new item ID I’m getting is 6WvFfRcXFq2xrmJ7.

I think it will likely work well. Have you tried it?

Will be tomorrow morning. I’ll circle back and let you know if it worked.

It may be worth noting that I canceled my paid Todoist sub. I’ve still got a few months on it, but I’ve consolidated my tasks down to be under the free usage.

Good news - it worked! So apparently those IDs can now include letters too, which seems to be the default for all my tasks - curiously/amusingly, the old IDs seem to still work too!

Hi,

i tried out your card and it works great in my dashboard. It’s a very good tool.

I tried to send notifications regarding the due today or overdue tasks, but I didn’t found a solution.

Is it possible to create an sensor (“sensor.overdue”) with the filter function. So that it only shows the number of overdue or due today tasks. I want to use this as an trigger for a message.

Sensor.overdue > 0 sent notification.

It would be also great if it is possible that I can show in the message then only the overdue or due today tasks.

When over

Have you considered trying to achieve that from Todoist? It’s probably simpler to do it there.

From home assistant, you would have to manage the sensor in a way that it wouldn’t send repeating notifications (once a day only?).

Anyway, I am tied in other projects and I don’t think I can find the time for new features currently, sorry …

In todoist it is not possible. I thought it would be easy possible with powertodoist and the filter function.
I want to send it once a day, so in a automation with that sensor and a defined time it would be possible.

@pgr Just wanted to say thank you for making this. My wife and kiddo have ADHD and I used the automation integration that you included with this to help give them the dopamine hit that they need when creating tasks.
I currently I have it set up so that when they complete a task it calls an automation that plays sounds and flashes some lights in the house.
My kid loves it!
Great job!

Well, that’s one use I would have never thought of :smile:

Thanks for sharing!

@pgr - I have recently gotten back into customizing my HA for a tablet dashboard, and am really looking forward to using this. (Especially after the Alexa/Todoist integration went away - that’s causing some issues for my partner :slight_smile: ).

I have followed your instructions exactly, but I’m running into a problem. When I try to add todoist_cmd_with_api_token: to secrets.yaml, saving it results in an “undefined” error and the line is removed from the file when it saves. Hence the configuration check via Developer Tools gives this error:
Error loading /config/configuration.yaml: Secret todoist_cmd_with_api_token not defined
I am running Core 2024.12.5, Supervisor 2024.12.3, Operating System 14.1, Frontend 20241127.8. (I am not going to upgrade to 2025.1 at this time). Thanks for any assistance!

Here is my YAML:

secrets.yaml

# Use this file to store secrets like usernames and passwords.
# Learn more at https://www.home-assistant.io/docs/configuration/secrets/
some_password: welcome
todoist_api_token: 'Bearer (redacted)'
todoist_cmd_with_api_token: 'echo "{\"label_colors\":" $(curl -s https://api.todoist.com/rest/v2/labels -H "Accept: application/json" -H "Authorization: Bearer (redacted)") "}" '

configuration.yaml

sensor:
  - name: Household
    platform: rest
    method: GET
    resource: 'https://api.todoist.com/sync/v9/projects/get_data'
    params:
      project_id: (redacted)
    headers:
      Authorization: !secret todoist_api_token
    value_template: '{{ value_json[''project''][''id''] }}'
    json_attributes:
      - project
      - items
      - sections
      - project_notes
    scan_interval: 30
sensor:
  - name: Household Chores
    platform: rest
    method: GET
    resource: 'https://api.todoist.com/sync/v9/projects/get_data'
    params:
      project_id: (redacted)
    headers:
      Authorization: !secret todoist_api_token
    value_template: '{{ value_json[''project''][''id''] }}'
    json_attributes:
      - project
      - items
      - sections
      - project_notes
    scan_interval: 30
sensor:
  - name: Personal
    platform: rest
    method: GET
    resource: 'https://api.todoist.com/sync/v9/projects/get_data'
    params:
      project_id: (redacted)
    headers:
      Authorization: !secret todoist_api_token
    value_template: '{{ value_json[''project''][''id''] }}'
    json_attributes:
      - project
      - items
      - sections
      - project_notes
    scan_interval: 30
command_line:
  - sensor:
      name: label_colors
      command: !secret todoist_cmd_with_api_token
      value_template: >
        {{ value_json.label_colors | length }}
      json_attributes:
        - label_colors
      scan_interval: 200
rest_command:
  todoist:
    method: post
    url: 'https://api.todoist.com/sync/v9/{{ url }}'
    payload: '{{ payload }}'
    headers:
      Authorization: !secret todoist_api_token
    content_type: 'application/x-www-form-urlencoded'

I don’t see what could be the problem there. Maybe look for a more detailed message in home assistant logs, at the moment when it removes your line from secrets.yaml

Sometimes it’s just some tiny syntactic detail…

I eventually solved this, but now I don’t remember exactly how. I think I had to move all of my sensors into configuration.yaml and not use the include file. Anyway, loving this card!

I have one further small problem: all of the dates assigned in Todoist are showing up a day earlier with the time 18h00. I am in America/Chicago time zone. So I think it is somehow converting from UTC and subtracting six hours? I have verified that my HAOS time zone setting is correct. Thoughts? Thanks!

This should work fine.

Check also the timezone settings in Todoist and in your device system (Android, iPhone, PC, etc).

Are you seeing this in your mobile? A simple test that might help is to log in via web browser on PC and see if the problem also appears there. Or the other way around - if you’re seeing this on your PC, check with the mobile app.

Is anybody else getting timezone problems with non-UTC dates? Tell us if it works well for you, or not. Thanks

Hello again @pgr

Same issue on companion app, Safari browser on mobile (iPad) and on Windows.

From my Windows PC
Todoist time zone:


Windows time zone:

HAOS times - query and result:
HAOS time query
HAOS time result

Comparison of same list in Todoist app and in HA. Today is Friday 17 January approx 09:45 CST (America/Chicago), so “tomorrow” is Saturday 18 January and “Sunday” is Sunday 19 January.


Thanks for any further suggestions!

Yep, I’m having issues with Easten Zone. In fact, I’ve been trying to use the Todoist sensors for another project and even when trying to use template data to show tasks within a specific time frame (where I know tasks exist), I get “no tasks within the specified time frame”

With that thought in mind though - is PowerTodoist able to be mucked around with via Card Mod? I’ve never really tried and if it can, I may abandon my Markdown car and use that instead.