From 28792bfb9ff7fa785a21a75e008ea6fb6894ae5a Mon Sep 17 00:00:00 2001 From: Andrej Sersen <44124120+andrejs2@users.noreply.github.com> Date: Wed, 29 Nov 2023 21:25:50 +0100 Subject: [PATCH] [SL] added lock_HassGetState, lock_HassTurnOn, lock_HassTurnOff intents (#1694) --- responses/sl/HassTurnOn.yaml | 2 +- sentences/sl/_common.yaml | 4 +-- sentences/sl/lock_HassGetState.yaml | 36 ++++++++++++++++++++++ sentences/sl/lock_HassTurnOff.yaml | 17 ++++++++++ sentences/sl/lock_HassTurnOn.yaml | 16 ++++++++++ tests/sl/_fixtures.yaml | 8 ++--- tests/sl/lock_HassGetState.yaml | 48 +++++++++++++++++++++++++++++ tests/sl/lock_HassTurnOff.yaml | 25 +++++++++++++++ tests/sl/lock_HassTurnOn.yaml | 25 +++++++++++++++ 9 files changed, 174 insertions(+), 7 deletions(-) create mode 100644 sentences/sl/lock_HassGetState.yaml create mode 100644 sentences/sl/lock_HassTurnOff.yaml create mode 100644 sentences/sl/lock_HassTurnOn.yaml create mode 100644 tests/sl/lock_HassGetState.yaml create mode 100644 tests/sl/lock_HassTurnOff.yaml create mode 100644 tests/sl/lock_HassTurnOn.yaml diff --git a/responses/sl/HassTurnOn.yaml b/responses/sl/HassTurnOn.yaml index 234f553d4b..37beb9888f 100644 --- a/responses/sl/HassTurnOn.yaml +++ b/responses/sl/HassTurnOn.yaml @@ -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" diff --git a/sentences/sl/_common.yaml b/sentences/sl/_common.yaml index afb2eeb0b4..cc1cca1f73 100644 --- a/sentences/sl/_common.yaml +++ b/sentences/sl/_common.yaml @@ -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" @@ -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: diff --git a/sentences/sl/lock_HassGetState.yaml b/sentences/sl/lock_HassGetState.yaml new file mode 100644 index 0000000000..60d1afb9ca --- /dev/null +++ b/sentences/sl/lock_HassGetState.yaml @@ -0,0 +1,36 @@ +language: sl +intents: + HassGetState: + data: + - sentences: + - "(ali so|je |ali je|so) {lock_states:state} [[v|na] ]" + response: one_yesno + requires_context: + domain: lock + slots: + domain: lock + + - sentences: + - "(ali so|ali je|je|so) [katera|kakšna] {lock_states:state} [[v|na] ]" + - "(ali so|ali je|je|so) [katera|kakšna] {lock_states:state} [[v|na] ]" + response: any + slots: + domain: lock + + - sentences: + - "(ali so|so) (vse|vsa) {lock_states:state} [[v|na] ]" + response: all + slots: + domain: lock + + - sentences: + - "(katere|katera) [je|so] {lock_states:state} [[v|na] ]" + response: which + slots: + domain: lock + + - sentences: + - "koliko je {lock_states:state} [[v|na] ]" + response: how_many + slots: + domain: lock diff --git a/sentences/sl/lock_HassTurnOff.yaml b/sentences/sl/lock_HassTurnOff.yaml new file mode 100644 index 0000000000..ebab958dad --- /dev/null +++ b/sentences/sl/lock_HassTurnOff.yaml @@ -0,0 +1,17 @@ +language: sl +intents: + HassTurnOff: + data: + - sentences: + - "odkleni [[v|na] ]" + requires_context: + domain: lock + response: lock + + - sentences: + - "odkleni [vsa|vse] [[v|na] ]" + - "odkleni [vsa|vse] " + slots: + domain: "lock" + name: "all" + response: lock diff --git a/sentences/sl/lock_HassTurnOn.yaml b/sentences/sl/lock_HassTurnOn.yaml new file mode 100644 index 0000000000..740f788419 --- /dev/null +++ b/sentences/sl/lock_HassTurnOn.yaml @@ -0,0 +1,16 @@ +language: sl +intents: + HassTurnOn: + data: + - sentences: + - "zakleni [[v|na] ]" + requires_context: + domain: lock + response: lock + - sentences: + - "zakleni [vse|vsa] [[v|na] ]" + - "zakleni [vse|vsa] " + slots: + domain: "lock" + name: "all" + response: lock diff --git a/tests/sl/_fixtures.yaml b/tests/sl/_fixtures.yaml index 52a94be4f4..42d1f8561e 100644 --- a/tests/sl/_fixtures.yaml +++ b/tests/sl/_fixtures.yaml @@ -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" diff --git a/tests/sl/lock_HassGetState.yaml b/tests/sl/lock_HassGetState.yaml new file mode 100644 index 0000000000..26f6c13791 --- /dev/null +++ b/tests/sl/lock_HassGetState.yaml @@ -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" diff --git a/tests/sl/lock_HassTurnOff.yaml b/tests/sl/lock_HassTurnOff.yaml new file mode 100644 index 0000000000..34d6972255 --- /dev/null +++ b/tests/sl/lock_HassTurnOff.yaml @@ -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" diff --git a/tests/sl/lock_HassTurnOn.yaml b/tests/sl/lock_HassTurnOn.yaml new file mode 100644 index 0000000000..a506f627a8 --- /dev/null +++ b/tests/sl/lock_HassTurnOn.yaml @@ -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"