Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SL] valve, cover sentences fixed #2060

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions responses/sl/HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ responses:
lock: "Odklenjeno"
scene: "Deaktivirana"
script: "Ustavljena"
valve: "Zaprt"
4 changes: 2 additions & 2 deletions sentences/sl/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ expansion_rules:
temperature: "{temperature}[°| <stopinj>| celzija] [{temperature_unit}|°C ] "
stopinj: "(stopin(j|ja|ji|je))"
temp: "temperatur[a|i|e|o]|termostat"
set: "(nastavi|spremeni|prilagodi|segrej|ohladi|dvigni|znižaj|spusti|dodaj|daj|obrni|zasuči|zavrti|odvij|zapri|odgrni|zagrni)"
set: "(nastavi|spremeni|prilagodi|segrej|ohladi|dvigni|znižaj|spusti|dodaj|daj|obrni|odpri|zasuči|zavrti|odvij|zapri|odgrni|zagrni)"
zapri: "(zapri|spusti|zagrni|zatesni|z[a]vij)"
odpri: "(odpri|dvigni|odgrni|razkrij|razvij|odkrij)"
covers: "([balkonska|zadnja|sprednja|drsna|kuhinjska]) vrata| ok(no|ni|na|en)| rolet(a|o|i|e) | žaluzij[a|o|i|e] | markiz(a|i|e|o) | tend(a|i|e|o) | (pokrov|pokrivalo) bazena | ograj(a|i|e|o) | zaves(a|o|i|e)"
Expand All @@ -342,7 +342,7 @@ expansion_rules:
izključi: "izključi[te|mo]|ugasni[te|mo|izklopi]"
ugasni: "izključi[te|mo]|ugasni[te|mo|izklopi]"
spremeni: "spremeni|prilagodi|nastavi|zamenjaj|zmanjšaj|povečaj|znižaj|ohladi|segrej"
numeric_value_set: "(spremeni|nastavi|obrni|zamenjaj|zmanjšaj|znižaj|povečaj|zvišaj|naredi|daj)"
numeric_value_set: "(spremeni|nastavi|obrni|zamenjaj|zmanjšaj|znižaj|povečaj|zvišaj|naredi|daj|odvij|odgrni|zagrni)"
katera_je: "kater[i|a|o] je|povej [mi]|katerakoli|katero|kateri|katera"
kakšna_je: "kakšna (je|so) | kakšno (je|so)| koliko (je|so) | povej [mi]"
kakšno_je: "kakšno je|povej [mi]"
Expand Down
13 changes: 9 additions & 4 deletions sentences/sl/homeassistant_HassSetPosition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ intents:
HassSetPosition:
data:
- sentences:
- "<set> <name> [na|do] <position>"
- "(<numeric_value_set>|<odpri>|<zapri>) <name> [na] [položaj|pozicijo] <position>"
requires_context:
domain:
- cover
- valve
domain: cover
slots:
domain: cover

- sentences:
- "(<numeric_value_set>|<odpri>|<zapri>) {cover_classes:device_class} [[v|na] <area>] [na] [položaj|pozicijo] <position>"
slots:
domain: cover
10 changes: 10 additions & 0 deletions sentences/sl/valve_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: sl
intents:
HassSetPosition:
data:
- sentences:
- "(<numeric_value_set>|<odpri>|<zapri>) <name> [na] [položaj|pozicijo] <position>"
requires_context:
domain: valve
slots:
domain: valve
11 changes: 11 additions & 0 deletions sentences/sl/valve_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: sl
intents:
HassTurnOff:
data:
- sentences:
- "<zapri> <name>"
requires_context:
domain: valve
slots:
domain: valve
response: valve
2 changes: 1 addition & 1 deletion sentences/sl/valve_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ intents:
HassTurnOn:
data:
- sentences:
- "odvij <name>" # odvij is not optimal verb for open valve - in collision with open from cover # needs fix
- "odvij <name>"
requires_context:
domain: valve
slots:
Expand Down
20 changes: 14 additions & 6 deletions tests/sl/homeassistant_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
language: sl
tests:
- sentences:
- "nastavi zaveso v spalnici na 50%"
#- "odpri zaveso v spalnici na 50%"
- "nastavi zaveso v spalnici na položaj 50%"
- "odpri zaveso v spalnici na pozicijo 50%"
- "odgrni zaveso v spalnici na 50%"
- "zagrni zaveso v spalnici na 50%"
intent:
name: HassSetPosition
slots:
domain: cover
name: "zaveso v spalnici"
position: 50
response: "Položaj nastavljen"

- sentences:
- "nastavi glavni ventil na 100%"
#- "odpri glavni ventil na 100"
- "nastavi roleto na balkonu na 50%"
- "odpri roleto na balkonu na pozicijo 50%"
- "zapri roleto na balkonu na položaj 50%"
- "daj roleto na balkonu na 50%"
- "odvij roleto na balkonu na 50%"
- "zagrni roleto na balkonu na 50%"
intent:
name: HassSetPosition
slots:
name: "glavni ventil"
position: 100
domain: cover
device_class: "blinds"
area: "balkonu"
position: 50
response: "Položaj nastavljen"
14 changes: 14 additions & 0 deletions tests/sl/valve_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: sl
tests:
- sentences:
- "nastavi glavni ventil na 100"
- "nastavi glavni ventil na pozicijo 100"
- "odpri glavni ventil na 100"
- "daj glavni ventil na 100"
intent:
name: HassSetPosition
slots:
domain: valve
name: "glavni ventil"
position: 100
response: "Položaj nastavljen"
11 changes: 11 additions & 0 deletions tests/sl/valve_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: sl
tests:
- sentences:
- "zapri glavni ventil"
- "zavij glavni ventil"
intent:
name: HassTurnOff
slots:
domain: "valve"
name: "glavni ventil"
response: "Zaprt"
2 changes: 1 addition & 1 deletion tests/sl/valve_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: sl
tests:
- sentences:
- "odvij glavni ventil" # odvij is not optimal verb for open valve - in collision with open from cover # needs fix
- "odvij glavni ventil"
intent:
name: HassTurnOn
slots:
Expand Down