Improved Shopping List! + Bring! + Google Assistant

Im nearly there re Bring! and Todo list integration. It seems to be working.

3 Likes

Iā€™ve installed it :smiley:
having a couple of teething problems at this stage. Hope you are all good with some feedback, wish I could do more to help but I am dumb as when it comes to any dev work sorry.

The words get translated into German in HA from the Bring app :slight_smile: This might be an opportunity to learn German, I was hopeless when I was over there LOL
Adding items from Bring works but only if you type it in and press the plus sign from HA will it add a product.
If the product has a tick next to it in HA it will not get unticked and added to the list in HA even if you add it in Bring
When I untick an item to add it it errors out with ā€¦

[140599125697088] BringTodoItem(summary='Nice and Natural', uid='bring_item_Nice_and_Natural', status=<TodoItemStatus.NEEDS_ACTION: 'needs_action'>) is not in list
[140599125697088] BringTodoItem(summary='Baby wipes', uid='bring_item_Baby_wipes', status=<TodoItemStatus.NEEDS_ACTION: 'needs_action'>) is not in list
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 230, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/todo/__init__.py", line 249, in _async_update_todo_item
    await entity.async_update_todo_item(item=update_item)
  File "/config/custom_components/bring/todo.py", line 122, in async_update_todo_item
    item_key = self._items.index(search_bring_item)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: BringTodoItem(summary='Nice and Natural', uid='bring_item_Nice_and_Natural', status=<TodoItemStatus.NEEDS_ACTION: 'needs_action'>) is not in list

The German thing is ā€¦ weird.
It happened to me too, but just on a single list and as one off.

Ive been unable to replicate it so its potentially fixed. The original code i ā€œborrowedā€ had some weird translation stuff in it, which i have ripped out as it seemed to be doing some odd things.

Which version have you installed? Updates in bring should be resolved as of 1.1.0. Based on the log output it looks like you have an older version, so try updating it.

aaah, I was on 0.0.2, that was the latest when I downloaded it a few hours ago :), installing 1.1.0, will let you know how I get on.
Awesome stuff by the way :slight_smile:

all good ā€“ the 2 things i worked on overnight where the things you mentioned.
There was an issue checking and unchecking items on the list.

And changes you made in bring werent synced to HA.

In my testing, both of those are sorted now.

soo much better but still in German, Iā€™ll take a look later once the kids have gone to bed, maybe it hates me cos Iā€™m from New Zealand and had to put my region as Australia

So ā€“ i found that once it went to German ā€“ i couldnt work out how to get it back. I dont really understand how it happened. I thought i had done it playing around with the old python API code, but it seems not!

Removing those items, and rec-reating them ā€” the new ones werent translated. You might need to go down that path, or potentially try deleting the integration, restarting, and re-adding it.

also the region doesnt actually DO anything ā€“ im probably going to remove it.

Nice work on this! Seems to work perfectly. I noticed that the login didnā€™t say Username/password, just empty fields to fill in. Otherwise, process is smooth! Now to play with voice commands!

1 Like

thanks for the positive feedback. If you notice anything please reach out

Will do! I will update on how I get on with the voice assistant. Not working right now but working through some testing/debugging.

So I have done a little bit of playing - and I just want to check a few things out and update on what I found.

  1. The instructions say to add the ā€œshopping listā€ integration. Is that meant to be add the ā€œbring to-do listā€ integration? I added the shopping list and it simply added a standard shopping list, so added the ā€˜Bring Todo listā€™ which worked and added all bring lists. Maybe if something wrong happened here, 2. below could be solved.
  2. (I am not too schooled up on this, butā€¦) The shopping list integration appears to add the intent for voice commands. I have tried a few things to get voice commands to add to the bring list but canā€™t seem to make it work. I tried renaming my bring list that came in from todo.bring_todo_shopping_list to todo.shopping_list which didnā€™t appear to work. Tried a few restarts with this configuration but the intent then stopped working for voice commands.

I will try to do some more digging and if I find out anything I will report back - I am not too across how the voice command system works except for being a standard user so I might be looking in the wrong place.

The instructions probably arent 100% up to date, as i forked the original component and modified it.

The integration is definitely called Bring Todo List. I must have missed it somewhere in the README.

It does still say shopping list on the configuration screen ā€“ stuffed if I can work out where its pulling that from though as that phrase doesnt exist anywhere in the code!

Still getting the german translations, buggered if i know, going to delete it all again, reboot a couple of times and reinstall

nope, no idea what Iā€™ve done wrong :confused:

If you delete one of the German items, and recreate it, does it come back?

creating my own items worked, it looks like we will have to create our own lists and not use the one native to Bring

In my testing, once the german entries are gone, its all fine.

May have been a bug in v0.0.2. I havent been able to make it happen again.

they are still lurking in Bring, I cannot remove the items that come with the app, that I am aware of. The items we create start in the Own Items category, will just have to spend some time tidying it up. Need to make it as easy as possible for the wife, she gets pissed off with this stuff easily :wink:

You should be able to remove them from bring directly, or mark as checked and then clear checked items, which also deletes them.

1 Like