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

Hi

I forked the existing Todoist-card and this is what I came up with

Have a look at the Documentation, It is highly configurable and you can actually do many useful things with it in HASS, apart from the basic Todoist to-do list.

I am looking for Beta testers, people who want to play with it and can help me iron out the quirks and bugs. Thanks!

3 Likes

Let me know if you have trouble installing it…

Heck, let me know if you have success installing it! since you would be the first one :smiley:

I’m still adding new features.

Will do this in the next few days! Thanks for your hard work!!

Hey! I added a new “engine” to filter by due dates, all combinations that you can think of are now possible.

I moved the project to Beta stage, in hopes of not scaring people off so much. I am enthusiastically awaiting my first user ever.

If anybody has tried installing this, please tell me how it went. I currently have zero feedback.

Going to install this today and put it in place on my Kitchen’s dashboard (that gets casted to a Google Hub Max) … I’m interested in seeing if I can configure it to use the “checking” of a task to start a script, the completion of which starts an automation.

I’ll circle back! :+1:

1 Like

Okay, installed (side by side with the non-power Todoist-card) and encountering some minor quirks:

type: custom:powertodoist-card
show_header: false
show_item_add: false
filter_show_dates_ending: '0'
show_completed: 0
entity: sensor.kitchen
filter_today_overdue: true

is the .yaml I have configured in my card. My expectation is that I’ll get a list of the remaining tasks due today, in time order (as they’re presented on Todoist, like so):

Instead I’m getting this, which is the entire list of various kitchen tasks (though admittedly does seem to be in time order):

I also needed clearer instructions on how to implement the automation function. As I mentioned in my previous post, my intent is to use the completion of a task (eating breakfast) to start a helper timer, that on completion, reminds me to do another task, elsewhere. Feel free to presume I’m an idiot here and need basic instructions, because that’s probably accurate.

Thanks for your time and efforts thus far!

:point_up: Remove this item, it’s deprecated - the other date filter options include everything that that used to do.

Add this, if you want (this forces HASS to sort by due date, regardless of the order that Todoist provides in the API, which I believe is what your currently getting):

sort_by_due_date: true

Those are just details.

:point_right: For the main issue you have, which is the task selection not filtering what you want, I need a bit more information. Please pick a task that shows, but should not be showing (for example, if I understand correctly, “eat breakfast”) and tell me how it looks in Todoist. I assume you checked it as done, and todoist re-generated it because it’s a daily repeat task. Which due date/time did it get now?

:point_down: running a script is currently not possible. You can, however, run an automation, and have that run the script. I will look into adding a way to run scripts directly, it shouldn’t be too hard.

Ok, the calling scripts thing is done. :cool:

See this documentation change to get an idea:

Basically, I dropped the action called automation and called it service instead; and gave it the ability to call both automations and scripts.

So you can just do something like:

actions_close:
  - close
  - service: script.my_script

So this is what my .yaml looks like now:

type: custom:powertodoist-card
show_header: false
show_item_add: false
filter_show_dates_ending: '0'
show_completed: '0'
entity: sensor.kitchen
sort_by_due_date: true

Unfortunately, the visual is still the same as my previous post - all of the various kitchen tasks, regardless of due date. And that’s the main issue I’m having - I’d ideally like it to not just show the tasks for that sensor (in this case, my kitchen) for that day only but to put them in order by TIME. So like in one of my previous images, where “Feed Cats Dry Food” was due at 1:15 PM, and then “Eat Lunch” at 1:30 PM (etc). Am I making sense?

And will I need to do anything to get the script function working? Github is still showing the most current version as 2 days ago.

I just released 0.8-beta which has the scripts feature.

I will look at the dates issues tomorrow. Thanks for testing!

I released v0.09-beta just now.

After installing it, please change the sort command to this:

sort_by_due_date: "ascending"

It should now sort by time as you expect.

But regarding items that are showing, that shouldn’t be showing, did you read the “:point_right:” part above? I need to reproduce your issue exactly, here. So it helps to know the full YAML (you already gave me that), the current time of day, and the item as shown in Todoist (so I can see what date and time it has over there).

I released v0.10-beta just now.

After installing it, you can use this additional option:

show_dates: true

It should show the due date of the item, at the start of the labels row, like Todoist does. This is quite helpful while debugging due dates configurations.

This new feature is still a work in progress, I know that the formatting is unsatisfactory, and people will ask for colors and relative dates (today, 2 days ago), etc. but that’s for later.

So this is my current code (after updating to your latest version):

type: custom:powertodoist-card
show_header: false
show_item_add: false
entity: sensor.kitchen
sort_by_due_date: ascending
show_dates: true
show_completed: 0
filter_show_dates_ending: '0'

Unfortunately, it’s still showing all the tasks in that project, not the ones only do that day (which I thought filter_show_dates_ending: '0' was supposed to resolve).

I can’t make much of that list without knowing the due date values in Todoist.

And I suspect that it still hasn’t refreshed yet; make sure you restart Home assistant, and give your browser a Ctrl-F5 to hard refresh. A sign that the new code has loaded would be that some due dates start showing on the list, like this:

image

Good morning, I follow all the instructions I think correctly and I don’t get to connect todoist to my home assistant. Could you help me?

'configuration.yaml
####################

# TODOIST

####################

* name: To-do List
platform: rest
method: GET
resource: ‘https://api.todoist.com/sync/v9/projects/get_data’
params:
project_id: [Todoist](https://todoist.com/app/project/bwhouse-mynumber)
headers:
Authorization: !secret todoist_api_token
value_template: ‘{{ value_json[’‘project’’][’‘id’’] }}’
json_attributes:
  * project
  * items
  * sections
  * project_notes
scan_interval: 30
* name: label_colors
platform: command_line
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’

secrets.yaml

####################

# TODOIST

####################
todoist_api_token: ‘Bearer myapi’
todoist_cmd_with_api_token: 'echo “{“label_colors”:” $(curl -s https://api.todoist.com/rest/v2/labels -H “Accept: application/json” -H “Authorization: Bearer myapi”) “}” ’

In resources this:
/local/todoist-card.js MĂłdulo JavaScript

What is the problem? Thanks’

MI SENSOR:
sensor.to_do_list

To-do List unknown friendly_name: To-do List

When you post configuration files, or any code, enclose it in triple back quotes, otherwise the formatting gets changed.

```
code
```

You can edit your post above to fix it.

I don’t see the sensor: header introducing the configuration block, did you remove it?

1 Like

I have not deleted it, it is simply defined in other sensors above. When I want to add the card it tells me that it does not exist.

As I wrote in the other thread, don’t try it with the card. Try it in Developer Tools / States, to see if it’s there and it has items from Todoist API. Only when you have the sensor configuration right, then you move on to trying things on a card.

EDIT: your configuration has asterisks instead of dashes?

No, it’s scripts, because it’s a copy-paste from their github. In sensor states it makes me unknown, as if it did not exist. And in this part: ‘Bearer myapi’ I simply omit my api but it is well put.