Skip to content

Commit

Permalink
[SL] added lock_HassGetState, lock_HassTurnOn, lock_HassTurnOff inten…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejs2 authored Nov 29, 2023
1 parent c4f42d0 commit 28792bf
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 7 deletions.
2 changes: 1 addition & 1 deletion responses/sl/HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ responses:
fans_area: "Ventilator je vklopljen"
cover_device_class: "Odpiram {{ slots.device_class }}"
cover_single: "Odpiram {{ slots.name }}"
lock: "Zakljenjena"
lock: "Zaklenjeno"
scene: "Aktivirana"
script: "Zagnana"
4 changes: 2 additions & 2 deletions sentences/sl/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ lists:
out: window
lock_states:
values:
- in: "zaklenjen[a|i|o]"
- in: "zaklenjen[a|i|o|ih]"
out: "locked"
- in: "odklenjen[a|i|o]"
out: "unlocked"
Expand Down Expand Up @@ -144,7 +144,7 @@ expansion_rules:
kje_je: "kje je|kje|kje so|kje se nahaja[jo|ta]"
vse: "[vsi|vsa|vse|vso]"
vsa: "[vsi|vsa|vse|vso]"
lock: "vrata"
lock: "vrat[a]|ključavnic(e|a|o)"
luč: "luč[i|ke|ko|ki|k]|svetil[a|i|o]|razsvetljav[e|o|a]|svetilk[e|o|a]"

skip_words:
Expand Down
36 changes: 36 additions & 0 deletions sentences/sl/lock_HassGetState.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
language: sl
intents:
HassGetState:
data:
- sentences:
- "(ali so|je |ali je|so) <name> {lock_states:state} [[v|na] <area>]"
response: one_yesno
requires_context:
domain: lock
slots:
domain: lock

- sentences:
- "(ali so|ali je|je|so) [katera|kakšna] <lock> {lock_states:state} [[v|na] <area>]"
- "(ali so|ali je|je|so) [katera|kakšna] {lock_states:state} <lock> [[v|na] <area>]"
response: any
slots:
domain: lock

- sentences:
- "(ali so|so) (vse|vsa) <lock> {lock_states:state} [[v|na] <area>]"
response: all
slots:
domain: lock

- sentences:
- "(katere|katera) <lock> [je|so] {lock_states:state} [[v|na] <area>]"
response: which
slots:
domain: lock

- sentences:
- "koliko <lock> je {lock_states:state} [[v|na] <area>]"
response: how_many
slots:
domain: lock
17 changes: 17 additions & 0 deletions sentences/sl/lock_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: sl
intents:
HassTurnOff:
data:
- sentences:
- "odkleni <name> [[v|na] <area>]"
requires_context:
domain: lock
response: lock

- sentences:
- "odkleni [vsa|vse] <lock> [[v|na] <area>]"
- "odkleni [vsa|vse] <area> <lock>"
slots:
domain: "lock"
name: "all"
response: lock
16 changes: 16 additions & 0 deletions sentences/sl/lock_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: sl
intents:
HassTurnOn:
data:
- sentences:
- "zakleni <name> [[v|na] <area>]"
requires_context:
domain: lock
response: lock
- sentences:
- "zakleni [vse|vsa] <lock> [[v|na] <area>]"
- "zakleni [vse|vsa] <area> <lock>"
slots:
domain: "lock"
name: "all"
response: lock
8 changes: 4 additions & 4 deletions tests/sl/_fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,18 @@ entities:
area: "entrance"
state: "locked"

- name: "Zadnja vrata"
- name: "zadnja vrata"
id: "lock.back_door"
area: "kitchen"
state: "unlocked"

- name: "Dvoriščna vrata"
- name: "dvoriščna vrata"
id: "lock.yard_door"
state: "locked"

- name: "Dovozna vrata"
- name: "dovozna vrata"
id: "lock.yard_gate"
state: "locked"
state: "unlocked"

- name: "Igranje"
id: "scene.play_mode"
Expand Down
48 changes: 48 additions & 0 deletions tests/sl/lock_HassGetState.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
language: sl
tests:
- sentences:
- "ali so vhodna vrata odklenjena?"
intent:
name: HassGetState
slots:
domain: lock
name: "vhodna vrata"
state: "unlocked"
response: "Ne"

- sentences:
- "so kakšna vrata zaklenjena?"
- "ali so vrata zaklenjena?"
intent:
name: HassGetState
slots:
domain: lock
state: "locked"
response: "Da, dvoriščna vrata in vhodna vrata"

- sentences:
- "ali so vsa vrata zaklenjena?"
intent:
name: HassGetState
slots:
domain: lock
state: "locked"
response: "Ne, nista dovozna vrata in zadnja vrata"

- sentences:
- "katera vrata so zaklenjena?"
intent:
name: HassGetState
slots:
domain: lock
state: "locked"
response: "dvoriščna vrata in vhodna vrata"

- sentences:
- "koliko vrat je zaklenjenih?"
intent:
name: HassGetState
slots:
domain: lock
state: "locked"
response: "2"
25 changes: 25 additions & 0 deletions tests/sl/lock_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: sl
tests:
- sentences:
- "odkleni vhodna vrata"
intent:
name: HassTurnOff
context:
domain: lock
slots:
name: "vhodna vrata"
response: "Odklenjeno"

- sentences:
- "odkleni vrata v kuhinji"
- "odkleni ključavnico v kuhinji"
- "odkleni kuhinjska vrata"
intent:
name: HassTurnOff
slots:
area:
- "kuhinji"
- "kuhinjska"
domain: lock
name: all
response: "Odklenjeno"
25 changes: 25 additions & 0 deletions tests/sl/lock_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: sl
tests:
- sentences:
- "zakleni vhodna vrata"
intent:
name: HassTurnOn
context:
domain: lock
slots:
name: "vhodna vrata"
response: "Zaklenjeno"

- sentences:
- "zakleni vrata v kuhinji"
- "zakleni ključavnico v kuhinji"
- "zakleni kuhinjska vrata"
intent:
name: HassTurnOn
slots:
area:
- "kuhinji"
- "kuhinjska"
domain: lock
name: all
response: "Zaklenjeno"

0 comments on commit 28792bf

Please sign in to comment.