Skip to content

Commit 07ffc5a

Browse files
authored
Add HassListAddItem intent (#1626)
* Add HassListAddItem intent * Shorten response * Fix test
1 parent 1cb75bd commit 07ffc5a

5 files changed

Lines changed: 49 additions & 0 deletions

File tree

intents.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,19 @@ HassGetWeather:
172172
name:
173173
description: "Name of the weather entity to use"
174174
required: false
175+
176+
# -----------------------------------------------------------------------------
177+
# todo
178+
# -----------------------------------------------------------------------------
179+
180+
HassListAddItem:
181+
supported: false
182+
domain: todo
183+
description: "Adds an item to a todo list"
184+
slots:
185+
item:
186+
description: "Item to add"
187+
required: true
188+
name:
189+
description: "Name of the list"
190+
required: true

responses/en/HassListAddItem.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: "en"
2+
responses:
3+
intents:
4+
HassListAddItem:
5+
item_added: "Added {{ slots.item }}"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: "en"
2+
intents:
3+
HassListAddItem:
4+
data:
5+
- sentences:
6+
- add <item> to<my_list>
7+
- put <item> (on|in)<my_list>
8+
response: item_added
9+
requires_context:
10+
domain: todo
11+
expansion_rules:
12+
my_list: "[ my| the] {name}[ list]"
13+
item: "{shopping_list_item:item}"

tests/en/_fixtures.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,3 +694,7 @@ entities:
694694
- name: "John"
695695
id: "person.john"
696696
state: "not_home"
697+
698+
- name: "Trader Joe[']s"
699+
id: "todo.trader_joes"
700+
state: ""

tests/en/todo_HassListAddItem.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: en
2+
tests:
3+
- sentences:
4+
- add apples to my trader joes list
5+
- put apples on the trader joes list
6+
intent:
7+
name: HassListAddItem
8+
slots:
9+
item: "apples "
10+
name: "Trader Joes"
11+
response: Added apples

0 commit comments

Comments
 (0)