Shopping list

Hi, I can use shopping list component in italian language.
I modified the intents in shopping.py. The original EN file was:

hass.components.conversation.async_register(INTENT_ADD_ITEM, [
    'Add {item} to my shopping list',
])
hass.components.conversation.async_register(INTENT_LAST_ITEMS, [
    'What is on my shopping list'
])

In IT language:

    hass.components.conversation.async_register(INTENT_ADD_ITEM, [
    'Aggiungi {item} alla lista della spesa',
])
hass.components.conversation.async_register(INTENT_LAST_ITEMS, [
    'Mostra lista della spesa'
])

In configuration.yaml you need only to add:

shopping_list:

Surely non the neatest solution but it works :slight_smile:

I am having the same problem on 0.57.2

Hi, I am italian too, can you tell me a bit more step by step, what I need to do, to have it in Italian.

In configuration?

conversation:
  intents:
    ShoppingListAddItem:
      - Add {item} to my shopping list

shopping_list:

Hi Claudio,

I created a custom component cloned from the original shopping.py and placed it under my custom_components folder.
I modified the intents in my custom shopping.py from:

hass.components.conversation.async_register(INTENT_ADD_ITEM, [
‘Add {item} to my shopping list’,
])
hass.components.conversation.async_register(INTENT_LAST_ITEMS, [
‘What is on my shopping list’
])

to:

hass.components.conversation.async_register(INTENT_ADD_ITEM, [
'Aggiungi {item} alla lista della spesa',

])
hass.components.conversation.async_register(INTENT_LAST_ITEMS, [
‘Mostra lista della spesa’
])

In configuration.yaml you don’t need to add specific intents, so you configuration.yaml should look like:

conversation:
shopping_list:

Hope this helps

Ste

1 Like

You can also do this without creating a custom component. This is what I have in my configuration.yaml to enable shopping-list commands for the Dutch language

The required intents are defined in shopping_list.py, so that’s where those come from.

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
  intents:
    HassShoppingListAddItem:
      - Zet {item} op de boodschappenlijst
    HassShoppingListLastItems:
      - Wat staat er op de boodschappenlijst

i gave it a try again and apparently it works now. I’m on HA version 0.61.1.

However, I tried to change the sentence to…

intents:
  ShoppingListAddItem:
    - Add {item} into shopping list

or add more variations such as…

intents:
  ShoppingListAddItem:
    - Add {item} into shopping list
    - Add {item} into my shopping list
    - Add {item} to shopping list
    - Add {item} to my shopping list

…none of them works. My configuration doesn’t take effect. Only Add {item} to my shopping list works.

What happen when you say “Wat staat er op de boodschappenlijst”? Does it show you the items in your shopping list? Can you share a screenshot of how it looks like?

I am trying to create an automation for my Telegram bot where I ask “What is in my shopping list?” and it will reply back with the list of items in my shopping list.

Here’s a screenshot. It shows the top 5 items on my shopping list. In reality, there were actually eight items. In reality, I don’t really use this function, as i’d rather just look at the list itself (and check of the items as I go through the supermarket).

1 Like

Same here :frowning: