Shopping list using Todoist?

Hi guys,

I am trying to use Todoist to create a shopping list that I can use with both Home Assistant and Google Home. I have got the google home integration sorted, and have Todoist added as a calendar.

I have then created a template sensor to pull out the tasks within my ‘Shopping’ project ie. my shopping list. The output string looks like: [‘item 1’,‘item 2’,‘item 3’] etc

Picture1

I am looking for a way to break up this string in to individual items that I could display as a list. Any ideas?

Plan is to also add a script to update my todoist list with new items as shown in the picture.

Ok next problem. When I call the new task service and use the following:

{
“content”: “{{ states.input_text.shopping.state }}”,
“project”: “shopping”,
“due_date”:“2018-09-12 14:00”
}

it passes through {{ states.input_text.shopping.state }} as the task name, and not whatever is in the text box. Any ideas on this one too?

Not sure if this will help you or not.
I’ve been playing around with the IFTTT and todoist.

I am currently using the “Create task in todoist make a web request” and use the api command https://youripaddress:8123/api/services/shopping_list/add_item?api_password=YOUR_API_PASS_FOR_HA

Then for the body portion of the webhook {“name”:"{{TaskContent}}"}

You can use the same for “task complete” just switch out the “add_item” to “complete_item” in the url request form, and leave the body exactly the same.

That way the shopping list format will remain the same. I’m still working on a script/trigger/automation to go backwards though. (From HA to Todoist)

Hope that helps!

Has any progress been made on this? I’m looking to send items from HA to todoist. I can do it via service calls but i’d prefer to use the current shopping list integration

I gave up on this a while back. Hopefully someone else has tried something similar and got it to work!

1 Like