All of the Todoist “calendars” I created via my configuration.yaml for this card have been unavailable since just after noon today. I’m on Home Assistant 2022.12.0b6 Supervisor 2022.11.2.
In trying to troubleshoot this, I saw that the Todoist v1 api was removed Nov 30 (see here) - might that be causing the issue? Oddly, my various lists SEEM to be accurate on HA (in cross checking them with the Todoist app) so I’m not sure what to make of this.
It’s a shame @Grinstantin didn’t comment here, but there was extensive changes in the documentation to both the configuration.yaml and the secrets.yaml. I can confirm making those changes DOES fix the card, but yeah, having to go digging to find the answer wasn’t ideal.
Sorry, I completely forgot about existence of this topic But changes in configuration files were mentioned in the release notes (as it is the most efficient way to communicate with users of this card):
There are changes to how Todoist handles authorization, so you need to update your configuration files.
Hey everyone! I’ve been playing with todoist-card, and finding it very useful.
Thanks @Grinstantin, great work. I hope life is not being too hard on you with the war and all
I’ve been playing with Javascript changes to the card, to add functionality. Eventually if I get things generic enough I could make a Pull Request to improve the card for everyone.
I have a few things going: mostly I am looking to do more actions when an Item is completed: write a description (“Done by user XYZ at 7:55pm”), add a Label, move to a different section.
I have all of these working, but just for my peculiar case, not generic, not configurable yet. That’s a lot more work.
I’m thinking of bringing in the Labels into HASS, so I can graphically see them on the items.
I also want to try building a swipe-card with multiple todo lists side by side, or maybe different sections, to emulate a Kanban view (without drag-and-drop, sorry). This part can be done just with HASS configs, no JS tweaks are necessary.
I’d just like to ask, has anybody else been doing this sort of thing? And what Todoist functionality would you most want to be able to access from the Home Assistant side?
Just curious, has anyone used something like a zigbee button to trigger a ‘job completion’ of a todoist task? And how did you do it if so? @Grinstantin , is this even possible?
You can make the Zigbee button call an automation.
Using the existing REST command recommended in todoist-card installation instructions, you can set up an automation for it, and in the actions do this:
But this has a few problems: that ID is the item’s ID, so it specifies which task you will be completing. You can get it from the URL inside todoist when editing the task, so something like https://todoist.com/app/project/2342185948/task/6874471432
I don’t know if this will be useful to you in such a static way, but maybe yes.
The other problem, which is really going to require a solution, is that the uuid needs to be different each time. It can be anything, but it has to be unique because that is what the Todoist API uses to distinguish requests from one another. If you can find a way for HASS to put in some random number there, or a timestamp, then you’re good to go.
I think you can just omit the data_completed argument and it should work.
I think this is very much a step in the right direction. It seems like I would need a way to not just generate the uuid daily (as these are daily tasks), but perhaps automatically update the automation(s) with this information as well? Pardon my ignorance, but is it even possible to adjust an automation like that from the backend?
I’m waiting on my zigbee buttons to arrive to the States (gogo AE!) but if all else fails I think I could set a task (ironic) to myself to update each of those UUIDs at night (when all those other tasks are complete).
I removed the complete_data, and Todoist uses the current date. I added a random number for uuid, there are probably better ways to generate random numbers, but that’s a start.
You can also probably use templates to facilitate getting the task id, if it’s not completely stable. If you want to complete the same action often, then you will also need some way to “uncomplete”.
It’s going to be 3 different daily tasks (each to take medications, as it were). So if I was only doing the trigger once daily, it should be reset by the next time I trigger it, yes?
Although this post was completely ignored (which is highly unusual when somebody asks “does anybody want new features?”, eh eh), I have made a lot of progress and will soon be releasing a Power-Todoist card (a fork from the current card) which adds a ton of features.
It’s highly configurable with practically all Todoist actions available from buttons that are fully customizable. You can add and remove labels, filter your tasks with a bunch of criteria, move tasks between sections and projects, etc.
Some of the stuff looks really cool, like a swiper-card to swipe between different Todoist sections, which is a nice way to get a working Kanban into HA.
I allow for a handful of variable substitutions, so I can filter the card with a “dynamic” label that is the user name, for example. With that, I can keep separate lists for separate HA users in a single Todoist managed centrally. Very powerful and practical.
@pgr , another question for you, if you don’t mind.
I’ve got two Todoist accounts, and these tasks I’m currently trying to add to HA are on the account that wasn’t previously associated with HA. So I added this (as an example) to my configuration.yaml:
and my secrets.yaml has the appropriate info for those 2 api tokens. This doesn’t seem to be the right way to do this, however, as when trying to check and restart, I get the following error:
Invalid config for [rest_command]: template value should be a string for dictionary value @ data['rest_command']['todoist']['headers']['Authorization']. Got ['Bearer xxxx', 'Bearer yyyyy']. (See /config/configuration.yaml, line 327).
Any suggestions on how to accomplish this? I mean I can always move these tasks over to the Todoist that IS connected to HA, but I’d prefer not to if I can help it.
You need to duplicate the entire rest_command section so that you have both a “todoist” and a “todoist2” rest commands, each with its own method, url, payload, secret, etc
Perfect, that did the trick, and once I fixed the template in my automation to reflect that it was Todoist2, the button press completed the task. Huzzah!
In Todoist, there is an option to “show completed tasks”, turn that on.
Todoist only restarts tasks if you created them as recurring. To do this I think you need to create them with a “quick add” saying something like “Take medication every day”. These tasks will have a due date, and when you close them, instead of being marked as done, they get assigned a new due date for tomorrow.