The To-Do list integration has a number of services for adding, updating, or deleting items within a list, but there’s no way to move an item from one list to another.
I would love it if I could move an item from one list to another. Even better would be a way to move all items from one list to another or iterate through the list and decide whether or not to move the item based on some heuristic.
For example:
todo.move_item would allow users to select both a target and destination list and then specify the name of the item to move. This item would be added to the new list and deleted from the old one.
todo.move_incomplete_items would allow users to select both a target and destination list. All incomplete items in that list would be moved.
To be honest, I’ve been struggling to do this manually using the existing services. I can get the list, but iterating through it is challenging so these services would really help.
I think this is an frontend task using existing services as is.
We need a dropdown in the area next to where the description textarea is.
A dropdown, better search field, with available lists.
On selecting an other than current list do following programmatically steps on save:
@allenporter , I’m pinging you here as I believe you’re the “to-do list” guru.
I too need to be able to move items between lists (I have lists for what I need particular people to do that day, and a “backlog” list where I prep whats coming up.
Reading the above it appears that it might be able to be done with a front end script ? If so, any guidance you can give as to accomplishing that ?
Also, … images in tasks. I’m sure it’s in a list somewhere, but the whole “picture is 1000 words thing”, its simplifies describing stuff.
You should be able to accomplish this with a script or automation. I recommend doing this with a todo.get_items call to the source list get the list of items you are interested in, or filter by status. Then for each call todo.add_item on the destination list, then todo.remove_item.
If you are not yet familiar with scripts and automations, i might break this down into these steps:
Get familiar with todo.get_items in the developer tools and look at the responses to make sure it matches what you expect
Get familiar with the todo.add_item service in the developer tools and how it works
Make a script that makes the same call and adds todo items to a notification or somewhere you can see the result. This requires getting familiar with scripts
Modify the script to do any filtering of the todo items you want. This would require familiarity with jinja2 templates and things like the filter methods.
Hook it together to call the destination service instead of the notification service.
Thanks Allen. This would work for newly created to-dos or to-dos that don’t contain much info, but tasks synced in from some services (like Outlook/Microsoft To-Do) often have other metadata that Home Assistant can’t see. If I delete and re-create the task in the new list, all of this data would be lost.
This is one Synchronize 2 Home Assistant todo list - #2 by x4b1
but it synchonize, while I’m looking for that can move items from Google Tasks to do with after checking the item doesn’t exit in the todo list. Like ‘onion’ or ‘Onion’ .
The reason being I can speak to Nest Hub to add items to Google Keep list but not to HA todo list so want to move items through this process.
My use case: move a task from inbox to backlog if it has a due date set, to automate GTD-like behavior.
To make this work a todo.move_task service would be very useful (either that or a integration-specific service like todoist.move_task, since I’m using Todoist in this case).
Deleting and recreating tasks is insufficient because as @MasterDevwi points out this could lose metadata like comments, attachments, etc. that Home Assistant is unaware of.