Missing slots error when adding a sentence in a different language

I’m trying to add a sentence in Hebrew similar to the English sentence for adding an item to the shopping list.
This is the English sentence from github:

language: "en"
intents:
  HassShoppingListAddItem:
    data:
      - sentences:
          - add <item> to<my_list>
          - put <item> (on|in)<my_list>
        response: item_added
        expansion_rules:
          my_list: "[ my| the][ shopping] list"
          item: "{shopping_list_item:item}"

This is the sentence I added in custom_sentences/he:

language: "he"
intents:
  HassShoppingListAddItem:
    data:
      - sentences:
          - "תוסיף <item> לרשימת קניות"
        expansion_rules:
          item: "{shopping_list_item:item}"
lists:
  shopping_list_item:
    wildcard: true

I’m getting this error in the log:

hassil.recognize.MissingListError: Missing slot list {shopping_list_item}

I tried first with a different Intent name and when it didn’t work I changed it to the same as the default English Intent. I’m not sure how it works when overriding sentences.
According to the documentation the {shopping_list_item} should accept any string since it’s defined as wildcard.
I tried many ways of specifying the item but nothing works:
I tried to remove my definition of shopping_list_item because it’s already defined in _common.yaml.

Can anyone shed any light on this error?

1 Like

After some more tinkering I finally managed to get it to work, so I’ll leave this here for anyone that encounters the same issue.
When I changed shopping_list_item to shop_item it worked.
I guess the original shopping_list_item from the English sentence somehow got in the way.
The final sentence is this:

language: "he"
intents:
  ShoppingListAddItem:
    data:
      - sentences:
          - "תוסיף {shop_item} לרשימת קניות"
lists:
  shop_item:
    wildcard: true

And the intent script:

ShoppingListAddItem:
  action:
    service: "shopping_list.add_item"
    data:
      name: "{{ shop_item }}"

תודה רבה חיפשתי את זה