Skip to content
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
5 changes: 5 additions & 0 deletions responses/it/HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: it
responses:
intents:
HassSetPosition:
default: "Posizione {slots.name} impostata"
12 changes: 10 additions & 2 deletions sentences/it/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ lists:
out: "locked"
- in: "<unlocked>"
out: "unlocked"
position_level:
values:
- in: "[al] massimo"
out: 100
- in: "[al] minimo"
out: 1
- in: "[a] metà"
out: 50

# binary_sensor
bs_battery_states:
Expand Down Expand Up @@ -436,12 +444,12 @@ expansion_rules:
timer_set: "(avvia|imposta|crea|attiva)"
timer_cancel: "(cancella|stoppa|annulla|disattiva|arresta|ferma)"

# mix numerical and litteral value for seconds, minutes and hours for the setting of the duration of the timer
# mix numerical and literal value for seconds, minutes and hours for the setting of the duration of the timer
nb_seconds_duration: "({timer_seconds:seconds}|{timer_words_seconds:seconds})"
nb_minutes_duration: "({timer_minutes:minutes}|{timer_words_minutes:minutes})"
nb_hours_duration: "({timer_hours:hours}|{timer_words_hours:hours})"

# mix numerical and litteral value for seconds, minutes and hours for the request of the status of a timer by its initial duration
# mix numerical and literal value for seconds, minutes and hours for the request of the status of a timer by its initial duration
nb_seconds_start: "({timer_seconds:start_seconds}|{timer_words_seconds:start_seconds})"
nb_minutes_start: "({timer_minutes:start_minutes}|{timer_words_minutes:start_minutes})"
nb_hours_start: "({timer_hours:start_hours}|{timer_words_hours:start_hours})"
Expand Down
30 changes: 30 additions & 0 deletions sentences/it/cover_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
language: it
intents:
HassSetPosition:
data:
# Position
- sentences:
- "(<numeric_value_set>|<open>|<close>|<set>) [<the>][ ][(posizione|apertura)] [<of>] <name> <to> <position>"
requires_context:
domain: cover
slots:
domain: cover
# Position area
- sentences:
- "(<numeric_value_set>|<open>|<close>|<set>) [<the>][ ][(posizione|apertura)] [(<of>|<the>)] {cover_classes:device_class} (<to> <position>;[(<in>|<of>)] <area>)"
- "(<numeric_value_set>|<open>|<close>|<set>) <to> <position> [<the>][ ][(posizione|apertura)] [(<of>|<the>)] {cover_classes:device_class} [(<in>|<of>)] <area>"
slots:
domain: cover
# Max/Min/Medium position
- sentences:
- "(<numeric_value_set>|<open>|<close>|<set>) [<the>][ ][(posizione|apertura)] [<of>] <name> {position_level:position}"
requires_context:
domain: cover
slots:
domain: cover
# Max/Min/Medium position Area
- sentences:
- "(<numeric_value_set>|<open>|<close>|<set>) [<the>][ ][(posizione|apertura)] [(<of>|<the>)] {cover_classes:device_class} ({position_level:position};[(<in>|<of>)] <area>)"
- "(<numeric_value_set>|<open>|<close>|<set>) {position_level:position} [<the>][ ][(posizione|apertura)] [(<of>|<the>)] {cover_classes:device_class} [(<in>|<of>)] <area>"
slots:
domain: cover
7 changes: 7 additions & 0 deletions tests/it/_fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ entities:
state: "closed"
attributes:
device_class: curtain
- name: "Tapparella camera"
id: cover.camera
area: camera_da_letto
state: "closed"
attributes:
device_class: shutter
position: 10
- name: "Garage"
id: cover.porta_garage
area: garage
Expand Down
55 changes: 55 additions & 0 deletions tests/it/cover_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
language: "it"
tests:
# Position
- sentences:
- "Imposta tapparella camera al 50%"
- "apri tapparella camera a 50"
- "imposta la posizione della tapparella camera al 50%"
intent:
name: HassSetPosition
slots:
domain: cover
name: "Tapparella camera"
position: 50
response: "Posizione {slots.name} impostata"
# Position Area
- sentences:
- "Imposta la tapparella in camera da letto al 50%"
- "apri la tapparella in camera da letto al 50"
- "apri la tapparella della camera da letto al 50%"
- "Imposta l'apertura della tapparella al 50% in camera da letto"
- "Imposta al 50% l'apertura della tapparella della camera da letto"
intent:
name: HassSetPosition
slots:
domain: cover
device_class: "shutter"
area: "Camera da Letto"
position: 50
response: "Posizione {slots.name} impostata"
# Max/Min/Medium position
- sentences:
- "Alza la tapparella camera al massimo"
- "Imposta l'apertura della tapparella camera al massimo"
intent:
name: HassSetPosition
slots:
domain: cover
name: "Tapparella camera"
position: 100
response: "Posizione {slots.name} impostata"
# Max/Min/Medium position Area
- sentences:
- "Imposta la tapparella in camera da letto al massimo"
- "apri la tapparella in camera da letto al massimo"
- "apri al massimo la tapparella della camera da letto"
- "Imposta l'apertura della tapparella al massimo in camera da letto"
- "Imposta al massimo l'apertura della tapparella in camera da letto"
intent:
name: HassSetPosition
slots:
domain: cover
device_class: "shutter"
area: "Camera da Letto"
position: 100
response: "Posizione {slots.name} impostata"