Skip to content

Commit

Permalink
[BG] Add current time and add to shopping list (#2504)
Browse files Browse the repository at this point in the history
* [BG] Add current time and add to shopping list

* add tests

* fix tests

* test tweak
  • Loading branch information
MindFreeze authored Nov 13, 2024
1 parent 31dae61 commit d7cb47f
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 0 deletions.
10 changes: 10 additions & 0 deletions responses/bg/HassGetCurrentTime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: bg
responses:
intents:
HassGetCurrentTime:
default: >
{{ slots.time.hour }} часа
{% if slots.time.minute > 0: %}
и
{{ slots.time.minute }} {{ 'минута' if slots.time.minute == 1 else 'минути' }}
{% endif %}
5 changes: 5 additions & 0 deletions responses/bg/HassShoppingListAddItem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: bg
responses:
intents:
HassShoppingListAddItem:
item_added: "Добавих {{ slots.item }}"
7 changes: 7 additions & 0 deletions sentences/bg/homeassistant_HassGetCurrentTime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: bg
intents:
HassGetCurrentTime:
data:
- sentences:
- "(<what_is>|кажи ми) [колко е] [часът]"
- "колко е [часът] [[точно] сега]"
13 changes: 13 additions & 0 deletions sentences/bg/shopping_list_HassShoppingListAddItem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: bg
intents:
HassShoppingListAddItem:
data:
- sentences:
- "добави <item> (в|към) <my_list>"
- "сложи <item> (в|към) <my_list>"
- "прибави <item> (в|към) <my_list>"
- "запиши <item> (в|към) <my_list>"
response: item_added
expansion_rules:
my_list: "[списъка|списъка ми] [с|със|за] [покупки|пазаруване]"
item: "{shopping_list_item:item}"
9 changes: 9 additions & 0 deletions tests/bg/homeassistant_HassGetCurrentTime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: bg
tests:
- sentences:
- "колко е часът"
- "колко е часът точно сега"
- "кажи ми колко е часът"
intent:
name: HassGetCurrentTime
response: 1 часа и 2 минути
12 changes: 12 additions & 0 deletions tests/bg/shopping_list_HassShoppingListAddItem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: bg
tests:
- sentences:
- "Добави ябълки към списъка"
- "Сложи ябълки в списъка ми"
- "Прибави ябълки към списъка с покупки"
- "Запиши ябълки в списъка за пазаруване"
intent:
name: HassShoppingListAddItem
slots:
item: "ябълки"
response: "Добавих ябълки"

0 comments on commit d7cb47f

Please sign in to comment.