madmachinations / home-assistant-alexa-shopping-list

A custom component for Home Assistant which synchronises your Alexa Shopping List
GNU General Public License v3.0
32 stars 3 forks source link

Using Todoist instead of Home assistant native shopping list #20

Closed noheton closed 1 month ago

noheton commented 1 month ago

Thank you for your awesome integration / addon. This salvages my existing Alexa setup.

One minor addition i would wish for would be supporting not only the native shopping list for home assistant but also allowing sync with todoist (or similar platform in home assistant).

Currently trying to figure out if this is possible without too much effort.

Thanks again. I hope you consider my idea.

Best regards Florian

mmstano commented 1 month ago

Someone made a blueprint that can sync two lists together, but it requires making a third list as an intermediary between the two. I use it currently to sync my HA shopping list with an apple reminder list using the Microsoft Office HACS component.

noheton commented 1 month ago

I think you're referring to https://community.home-assistant.io/t/synchronize-2-home-assistant-todo-list/684390

Strange - I tried it yesterday and had a lot of trouble with it. Maybe I got the configuration wrong. Is the third list one of the existing ones or a "brand new" one?

Thanks in advance.

mmstano commented 1 month ago

The third one is a brand new one. You’ll have three lists total.

  1. Home Assistant Shopping List
  2. Third party list (like todoist or MS office)
  3. Sync list
madmachinations commented 1 month ago

The previous version of this integration actually used to synchronise your alexa list via todoist.

All the todoist stuff was stripped out and replaced after amazon shut down third party integrations.

While I see no reason to specifically add synchronisation with todoist to this integration, as it has more than enough maintenance as it is; What I can at least offer is that this integration emits an event when the shopping list updates and changes, which could be used with other integrations.

If you drag up the previous version of this project, you will get the python script which allowed adding/editing/removing items in todoist. That original custom component could be taken and repurposed as a separate component.

madmachinations commented 1 month ago

Here is the original integration:

https://github.com/madmachinations/home-assistant-alexa-shopping-list/tree/80715ae1889c0d96b23410de79eb5635485668ed

If you know python, then you should be able to take some of the parts out of this and cobble together a new custom component which reads from the HA shopping list when it is updated and uses the todoist api to make a project in todoist match.

madmachinations commented 1 month ago

Your other option to sync with todoist, without involving home assistant; Would be to take the server from this project and modify it, so it updates a todoist project to match. And then this could be run seperately, or used in conjunction with the HA component so both are kept up to date.

madmachinations commented 1 month ago

The event this integration fires in HA when the shopping list changes is alexa_shopping_list_changed.

It does not provide any data, but it is only triggered when the list actually changed.

So you could read the .shopping-list.json file after that event has emitted and be confident it has changed and that these items are all the items currently on the list

noheton commented 1 month ago

Thank you for your ideas.

Regarding Todoist - i was thinking to integrate it with through Home Assistants integration. Currently it only seems to work with the "local" shopping list. Thanks for the links, I will see if i can cobble something together.

For reference: As a stopgap I implemented a direct alexa-todoist sync in node red: https://gist.github.com/noheton/b9608fb5dc272b0834bd2a4cf03f6c3f Not perfect, not all edge cases covered - but works good enough for me.