Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
phellarv authored Nov 17, 2023
2 parents 12f6743 + 984557c commit 034066e
Show file tree
Hide file tree
Showing 36 changed files with 674 additions and 23 deletions.
37 changes: 32 additions & 5 deletions responses/es/HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ responses:
{% if query.matched %}
{% else %}
No, su estado es {{ state.state_with_unit }}
{% if state.domain == "person" %}
No, está en {{ state.state_with_unit }}
{% else %}
No, su estado es {{ state.state_with_unit }}
{% endif %}
{% endif %}
any: |
Expand All @@ -27,7 +31,11 @@ responses:
Sí, {{ match[:3] | join(", ") }} y otros {{ (match | length - 3) }} dispositivos más
{%- else -%}
{% if match | length == 1 %}
Sí, el dispositivo {{ match|first }}
{% if state.domain == "person" %}
Sí, {{ match|first }}
{% else %}
Sí, el dispositivo {{ match|first }}
{% endif %}
{% else %}
Sí,
{% for name in match -%}
Expand All @@ -46,17 +54,29 @@ responses:
{% else %}
{% set no_match = query.unmatched | map(attribute="name") | sort | list %}
{% if no_match | length > 4 %}
No, ni {{ no_match[:3] | join(", ni ") }} ni otros {{ (no_match | length - 3) }} dispositivos tienen ese estado
{% if state.domain == "person" %}
No, ni {{ no_match[:3] | join(", ni ") }} ni otros {{ (no_match | length - 3) }} están en {{slots.state}}
{% else %}
No, ni {{ no_match[:3] | join(", ni ") }} ni otros {{ (no_match | length - 3) }} dispositivos tienen ese estado
{% endif %}
{% else %}
{% if no_match | length == 1 %}
No, el dispositivo {{ no_match|first }} no tiene ese estado
{% if state.domain == "person" %}
No, {{ no_match|first }} no está en {{slots.state}}
{% else %}
No, el dispositivo {{ no_match|first }} no tiene ese estado
{% endif %}
{%- else -%}
No, ni
{% for name in no_match -%}
{% if not loop.first and not loop.last %}, ni {% elif loop.last and not loop.first %} ni {% endif -%}
{{ name }}
{%- endfor %}
tienen el estado {{slots.state}}
{% if state.domain == "person" %}
están en {{slots.state}}
{% else %}
tienen el estado {{slots.state}}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
Expand All @@ -78,3 +98,10 @@ responses:
how_many: |
{{ query.matched | length }}
where: |
{% if state == "not_home" %}
{{ slots.name | capitalize }} está fuera
{% else %}
{{ slots.name | capitalize }} está en {{ state.state }}
{% endif %}
24 changes: 24 additions & 0 deletions responses/es/HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: es
responses:
intents:
HassGetWeather:
default: >
{% set weather_condition = {
'clear': 'Cielo despejado',
'clear-night': 'Cielo despejado',
'cloudy': 'Cielo nuboso',
'exceptional': 'Clima excepcionalmente adverso',
'fog': 'Niebla',
'hail': 'Precipitaciones en forma de granizo',
'lightning': 'Tormentas eléctricas',
'lightning-rainy': 'Lluvia y tormenta eléctrica',
'partlycloudy': 'Cielos parcialmente nublados',
'pouring': 'Lluvia copiosa',
'rainy': 'Lluvia',
'snowy': 'Precipitaciones en forma de nieve',
'snowy-rainy': 'Precipitaciones en forma de aguanieve',
'sunny': 'Sol',
'windy': 'Vientos',
'windy-variant': 'Vientos y nubes'
} %}
{{ weather_condition.get((state.state | string).lower(), "") }}, con una temperatura de {{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }}
5 changes: 5 additions & 0 deletions responses/es/HassListAddItem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: "es"
responses:
intents:
HassListAddItem:
item_added: "Se añadió {{ slots.item }}"
9 changes: 9 additions & 0 deletions responses/ro/HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,12 @@ responses:
how_many: |
{{ query.matched | length }}
where: |
{% if state.state == "not_home" %}
{{ slots.name | capitalize }} nu este acasă
{% elif state.state == "home" %}
{{ slots.name | capitalize }} este acasă
{% else %}
{{ slots.name | capitalize }} este la {{ state.state }}
{% endif %}
24 changes: 24 additions & 0 deletions responses/ro/HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: ro
responses:
intents:
HassGetWeather:
default: >
{% set weather_condition = {
'clear': 'cu cer senin',
'clear-night': 'cu cer senin',
'cloudy': 'și înnorat',
'exceptional': 'și exceptional',
'fog': 'cu ceață',
'hail': 'cu grindină',
'lightning': 'cu descărcări electrice',
'lightning-rainy': 'cu ploaie însoțită de descărcări electrice',
'partlycloudy': 'și parțial noros',
'pouring': 'cu averse de ploaie',
'rainy': 'cu ploaie',
'snowy': 'cu ninsoare',
'snowy-rainy': 'cu lapoviță',
'sunny': 'și însorit',
'windy': 'cu intensificări ale vântului',
'windy-variant': 'înnorat, cu intensificări ale vântului'
} %}
{{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }} {{ weather_condition.get((state.state | string).lower(), "") }}
5 changes: 5 additions & 0 deletions responses/ro/HassListAddItem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: "ro"
responses:
intents:
HassListAddItem:
item_added: "Am adăugat {{ slots.item }}"
7 changes: 6 additions & 1 deletion sentences/es/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,13 @@ lists:
shopping_list_item:
wildcard: true

zone:
wildcard: true

expansion_rules:
abre: "(abr(a|e|ir|í)|sub(a|e|ir|í))"
ahora: "[ahora [mismo]|actualmente|en este momento]"
añadir: "(añad(a|e|ir|í)|pon[ga|er|é])"
añadir: "(añad(a|e|ir|í)|apunt[a|e|ar|á]|pon[ga|er|é])"
apaga: "(apag(a|ue|ar|á)|desconect(a|e|ar|á)|desactiv(a|e|ar|á))"
area: "[en|del|de] [el|la] {area}"
brightness: "{brightness} [%|porciento|por ciento]"
Expand All @@ -313,13 +316,15 @@ expansion_rules:
cual_es: "(Cuál es [el|la]|Cuáles son [los|las])"
dime: "(sab(es|é)|dime|dec(ir|í|id)[me]|ind(i|í)(ca|que|car|cá)[me])"
dime_si: "<dime> si"
donde_se_encuentra: "dónde <se_encuentra>"
enciende: "(enc[i]end(a|e|er|é)|conect(a|e|ar|á)|activ(a|e|ar|á)|prend(a|e|er|é))"
ejecuta: "(<enciende>|ejecut(a|e|ar|á)|inici(a|e|ar|á))"
establece: "(pon[ga|er|é]|estable[z]c(a|e|er|é)|ajust(a|e|ar|á)|configur(a|e|ar|á))"
establece_sube_baja: "(<establece>|sub(a|e|ir|í)|baj(a|e|ar|á))"
mide: "[que] ([es|está] (mid(e|ie)|medi|indica|marca)[ndo|d(a|o)]|tiene|hay) [por|en]"
name: "[el|la|los|las] {name}"
puerta: "[el|la] (puerta|portón|cancela|verja|reja|compuerta|portillo)"
se_encuentra: (se (encuentra|localiza|ubica)|está|mora)
temp: "[el|la] (temperatura|calor|grados)"
temperature: "{temperature} [grados] [{temperature_unit}]"

Expand Down
10 changes: 9 additions & 1 deletion sentences/es/light_HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,13 @@ intents:
response: "light_all"
slots:
domain: "light"
area: "all"
name: "all"

# Turn off all lights in the same area as a satellite device
- sentences:
- "<apaga> ((la luz|las luces)[[ de] aquí]|todas las luces [de ]aquí)"
response: "lights_area"
slots:
domain: "light"
requires_context:
area: null
8 changes: 8 additions & 0 deletions sentences/es/light_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ intents:
slots:
domain: "light"
response: "lights_area"
# Turn on all lights in the same area as a satellite device
- sentences:
- "<enciende> ((la luz|las luces)[[ de] aquí]|todas las luces [de ]aquí)"
response: "lights_area"
slots:
domain: "light"
requires_context:
area: null
12 changes: 8 additions & 4 deletions sentences/es/lock_HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,29 @@ intents:
domain: lock

- sentences:
- "(está[n]|hay) alg(ún|una)[s] (cierre|cerradura|pestillo|puerta)[s] {lock_states:state}[ <area>]"
- "(está[n]|hay) alg(ún|una)[s] (cierre|cerradura|pestillo|cerrojo|llave)[s] {lock_states:state}[ <area>]"
- "(está[n]|hay) {lock_states:state} alg(ún|una)[s] (cierre|cerradura|pestillo|cerrojo|llave)[s][ <area>]"
response: any
slots:
domain: lock

- sentences:
- "están todas l(o|a)s (cierres|cerraduras|pestillos|puertas) {lock_states:state}[ <area>]"
- "están tod(o|a)s l(o|a)s (cierres|cerraduras|pestillos|cerrojos|llaves) {lock_states:state}[ <area>]"
- "están todas l(o|a)s (puertas|ventanas) {lock_states:state} [con] (cierre|pestillo|cerrojo|cerradura|llave)[ <area>]"
response: all
slots:
domain: lock

- sentences:
- "(qué|cual[es]) puerta[s] está[n] {lock_states:state}[ <area>]"
- "(qué|cual[es]) (cierre|cerradura|pestillo|cerrojo|llave)[s] está[n] {lock_states:state}[ <area>]"
- "(qué|cual[es]) (puerta|ventana)[s] está[n] {lock_states:state} [con] (cierre|pestillo|cerrojo|cerradura|llave)[ <area>]"
response: which
slots:
domain: lock

- sentences:
- "cuánt(o|a)s (puertas|cierres|cerraduras|pestillos) (están|hay) {lock_states:state}[ <area>]"
- "cuánt(o|a)s (cierres|cerraduras|pestillos|cerrojos|llaves) (están|hay) {lock_states:state}[ <area>]"
- "cuánt(o|a)s (puertas|ventanas) (están|hay) {lock_states:state} [con] (cierre|pestillo|cerrojo|cerradura|llave)[ <area>]"
response: how_many
slots:
domain: lock
8 changes: 4 additions & 4 deletions sentences/es/lock_HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ intents:
HassTurnOff:
data:
- sentences:
- "abrir [(cerradura|cerrojo|candado|llave|cierre|puerta) [de]] <name>[ <area>]"
- "quitar (cerradura|cerrojo|candado|llave|cierre) [de] <name>[ <area>]"
- "abrir [el|la[s]|los] [(cerradura|cerrojo|candado|llave|cierre)[s] [de]] <name>[ <area>]"
- "quitar [el|la[s]|los] (cerradura|cerrojo|candado|llave|cierre)[s] [en|de] <name>[ <area>]"
requires_context:
domain: lock
response: lock

- sentences:
- "abrir [todas|todos] [los|las] (cierres|cerraduras|cerrojos|candados|llaves|puertas) [de puerta[s]] <area>"
- "quitar [todas|todos] [los|las] (cierres|cerraduras|cerrojos|candados|llaves) [de puerta[s]] <area>"
- "abrir [todas|todos] [los|las] (cierres|cerraduras|cerrojos|candados|llaves) [de [la[s]] (puerta|ventana)[s]] <area>"
- "quitar [todas|todos] [los|las] (cierres|cerraduras|cerrojos|candados|llaves) [de [la[s]] (puerta|venana)[s]] <area>"
slots:
domain: "lock"
name: "all"
Expand Down
9 changes: 5 additions & 4 deletions sentences/es/lock_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ intents:
HassTurnOn:
data:
- sentences:
- "cerrar con (llave|cerrojo|pestillo|cerradura|candado|cierre) <name> [ <area>]"
- "echar (la llave|el cerrojo|el pestillo|la cerradura|el candado|el cierre) en <name> [ <area>]"
- "cerrar [con|el|la[s]|los] (llave|cerrojo|pestillo|cerradura|candado|cierre)[s] [de] <name> [ <area>]"
- "echar [el|la[s]|los] (llave|cerrojo|pestillo|cerradura|candado|cierre)[s] (en|de) <name> [ <area>]"
requires_context:
domain: lock
response: lock

- sentences:
- "cerrar con (llave|cerrojo|pestillo|cerradura|candado|cierre) [tod(o|a)s] [los|las] [cerraduras|cerrojos|pestillos|puertas] <area>"
- "echar (la llave|el cerrojo|el pestillo|la cerradura|el candado|el cierre ) en [tod(o|a)s] [los|las] [cerraduras|cerrojos|pestillos|puertas] <area>"
- "cerrar [con (llave|cerrojo|pestillo|cerradura|candado|cierre)] [tod(o|a)s] [los|las] [cerraduras|cerrojos|pestillos|cierres] <area>"
- "cerrar con (llave|cerrojo|pestillo|cerradura|candado|cierre) [tod(o|a)s] [los|las] [puertas|ventanas] <area>"
- "echar [el|la[s]|los] (llave|cerrojo|pestillo|cerradura|candado|cierre)[s] en [tod(o|a)s] [los|las] [cerraduras|cerrojos|pestillos|cierres|puertas|ventanas] <area>"
- "echar [tod(o|a)s] [los|las] (llaves|cerrojos|pestillos|cerraduras|candados|cierres) <area>"
slots:
domain: "lock"
Expand Down
44 changes: 44 additions & 0 deletions sentences/es/person_HassGetState.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
language: es
intents:
HassGetState:
data:
# https://www.home-assistant.io/integrations/person/
- sentences:
- "[<dime> ]<donde_se_encuentra> <name>"
response: where
requires_context:
domain: person
slots:
domain: person

- sentences:
- "[<dime> ]<se_encuentra> <name> [en] [el|la[s]|los] {zone:state}"
response: one_yesno
requires_context:
domain: person
slots:
domain: person

- sentences:
- "[<dime> ](<se_encuentra>|hay) alguien [en] [el|la[s]|los] {zone:state}"
response: any
slots:
domain: person

- sentences:
- "[<dime> ]<se_encuentra>[n] (todos|todo el mundo) en [el|la[s]|los] {zone:state}"
response: all
slots:
domain: person

- sentences:
- "[<dime> ]quién[es] <se_encuentra>[n] [en] [el|la[s]|los] {zone:state}"
response: which
slots:
domain: person

- sentences:
- "[<dime> ]cuánta[s] (gente|personas) (hay|<se_encuentra>[n]) [en] [el|la[s]|los] {zone:state}"
response: how_many
slots:
domain: person
4 changes: 2 additions & 2 deletions sentences/es/shopping_list_HassShoppingListAddItem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ intents:
HassShoppingListAddItem:
data:
- sentences:
- <añadir> <item> (en|a)<my_list>
- <añadir> <item> <my_list>
response: item_added
expansion_rules:
my_list: "[ mi| la] lista [de] [la] [compra]"
my_list: "[en|a] [mi|la] lista [de] [la] [compra]"
item: "{shopping_list_item:item}"
12 changes: 12 additions & 0 deletions sentences/es/todo_HassListAddItem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: "es"
intents:
HassListAddItem:
data:
- sentences:
- <añadir> <item> (a|en) [[mi|el] lista[do] [de|del|de la[s]|de los]] {name}
- <añadir> (a|en) [[mi|el|la] lista[do] [de|del|de la[s]|de los]] {name} <item>
response: item_added
requires_context:
domain: todo
expansion_rules:
item: "{shopping_list_item:item}"
8 changes: 8 additions & 0 deletions sentences/es/weather_HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: es
intents:
HassGetWeather:
data:
- sentences:
- "qué tiempo hace [en <name>]"
requires_context:
domain: weather
4 changes: 4 additions & 0 deletions sentences/ro/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,9 @@ lists:
shopping_list_item:
wildcard: true

zone:
wildcard: true

expansion_rules:
# Placeholders
area: "[(zona | regiunea | spa(ț|t)iul)] {area}"
Expand Down Expand Up @@ -472,6 +475,7 @@ expansion_rules:
# Prepositions
in: "((î|i)n)"
din: "(din | (î|i)n | pentru | [de] la | [de] pe | de)" # used particularly for areas
la: "(la | (î|i)n)" # used particularly for zones

# Adjectives
pornit: "(pornit[(ă|a)] | deschis[(ă|a)]) | aprins[(ă|a)] | activat[(ă|a)]"
Expand Down
2 changes: 1 addition & 1 deletion sentences/ro/light_HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ intents:
domain: light
response: lights_area
- sentences:
- "<opreste> (<lumina> | [toate] <luminile>)"
- "<opreste> (<lumina> | [toate] <luminile>)[ [de ]aici]"
slots:
domain: light
requires_context:
Expand Down
2 changes: 1 addition & 1 deletion sentences/ro/light_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ intents:
domain: light
response: lights_area
- sentences:
- "<porneste> (<lumina> | [toate] <luminile>)"
- "<porneste> (<lumina> | [toate] <luminile>)[ [de ]aici]"
slots:
domain: light
requires_context:
Expand Down
Loading

0 comments on commit 034066e

Please sign in to comment.