At least I could not find it, but there is no trigger from when you completed a task in todo and there is no trigger when a todo is added, changed or deleted.
Also it would be nice not to have to use templates to check if a item is already in the todo.
I was just about to create my own WTH when I saw this recommended for me.
I want to play a song on my speakers when completing a task. Or send a notification to my wife. Or send a webhook to another system. Or everything at once! This could also apply to shopping lists.
Why can’t I use checking an item off a list as a trigger?
Because tasks are a list of items and not specific entities for specific tasks, it is somewhat hard to do right. If you use an online task list, the task may be completed outside HA, or worse, removed upon completion.
So indeed, it is not simple. There definitely is room for improvement. To allevite it I created a topic on it with some things you can do using tasks. It gives some examples on how you can define specific tasks you are interested in, react on completion or deletion (with the assumption deletion equals completion), and create new tasks when needed:
Hope this helps until hour WTH is addressed.
Thanks, that’s really helpful! I’ll definitely take a look at your suggestions. Still, I’m hoping for a simpler, more direct solution in the future. I also came across this: Start automation when any Todo-List item is completed, so there is a clear demand for this feature
I created my own WTH as I didn’t find this one. I’ll add the details here.
I would like to have the following triggers:
- certain (named) item is added to a todo list
- certain (named) item is removed from a todo list
- state of a certain (named) item changes
- certain (named) item is due in less then
x
days
Right now I have to create an automation that triggers on every state change of the todo list and then use the service to get all todo items and check their states, due date etc.
Additionally to check the due date, I have to add a trigger, that runs the automation every day to check the due dates.
This has a few drawbacks:
- The automation does not trigger, if the due date changes
- The automation triggers, even if nothing relevant changes.
So I have to add conditions to check if any todo list item is relevant and the automation needs to run. - I don’t have easy access to the relevant todo list item.
It should be accessible by using the trigger, but the trigger is either the whole todolist or the time trigger.
So I would like to have a trigger that:
- allows to specify the todo list entity (required)
- allows to specify an item name (optional)
- allows to specify a trigger type (required):
- Added
- Removed
- State changed (may allow to specify the state)
- Is due in x days (similar to calendar trigger)