You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is for Romanian, but if I try hard enough, I can also get it replicated for English as well. There is a conflict between the device class name garage door and the commonly named garage area.
A sentence like is there any garage door open? would match the English-equivalent is there any <area> <domain/device_class> <state>? given area=garage, device_class=door and state=open
I have the following:
sentences/ro/binary_sensor_HassGetState.yaml
intents:
HassGetState:
data:
- sentences:
- "<exista_class_state_in_zona>"
expansion_rules:
class_singular: "<usa>" # the door
class_plural: "<usile>" # the doors
state_singular: "{bs_door_states_singular:state}"
state_plural: "{bs_door_states_plural:state}"
response: any
slots:
domain: binary_sensor
device_class: door
- sentences:
- "<exista_class_state_in_zona>"
expansion_rules:
class_singular: "(<usa>|<poarta>) [(de [la] garaj|garajului)]" # the garage door/gate
class_plural: "(<usile>|<portile>) [(de [la] garaj|garajului)]" # the garage doors/gates
state_singular: "{bs_door_states_singular:state}"
state_plural: "{bs_door_states_plural:state}"
response: any
slots:
domain: binary_sensor
device_class: garage_door
sentences/ro/_common.yaml
lists:
bs_door_states_singular:
values:
- in: "<deschis>"
out: "on"
- in: "<inchis>"
out: "off"
bs_door_states_plural:
values:
- in: "<deschise>"
out: "on"
- in: "<inchise>"
out: "off"
expansion_rules:
# (is|are) there any <class> <state> in <area>
exista_class_state_in_zona: "(<exista> ([<vreun>] <class_singular>; <state_singular>; [<din> <area>]) | (sunt | exist(ă|a)) (<class_plural>; <state_plural>; [<din> <area>]))"
este: "e[ste]" # is
exista: "(<este>|exist(ă|a))" # exists
usa: "u(ș|s)(ă|a)" # [the] door
usile: "u(ș|s)i[le]" # [the] doors
poarta: "poart(ă|a)" # [the] gate
portile: "por(ț|t)i[le]" # [the] gates
deschis: "(deschis[(ă|a)] | ridicat[(ă|a)])" # open
deschise: "(deschise | ridicate)" # open (plural)
inchis: "((î|i)nchis[(ă|a)] | coboar(â|a)t[(ă|a)])" # closed
inchise: "((î|i)nchise | coboar(â|a)te)" #closed (plural)
din: "(din | (î|i)n | pentru | [de] la | [de] pe | de)" # from/in - used particularly for areas
area: "[(zona | regiunea | spa(ț|t)iul)] {area}"
The tests fail by matching the door intent sentence, instead of the garage_door sentence, due to the fact that I have a (very commonly named) Garaj area, which is also part of the garage_door device class name:
FAILED tests/test_language_sentences.py::test_binary_sensor_HassGetState[ro] - AssertionError: Missing slot area for: exista usi de garaj inchise? (value=Garaj)
The issue is for Romanian, but if I try hard enough, I can also get it replicated for English as well. There is a conflict between the device class name
garage door
and the commonly namedgarage
area.A sentence like
is there any garage door open?
would match the English-equivalentis there any <area> <domain/device_class> <state>?
givenarea=garage
,device_class=door
andstate=open
I have the following:
sentences/ro/binary_sensor_HassGetState.yaml
sentences/ro/_common.yaml
tests/ro/_fixtures.yaml
tests/ro/binary_sensor_HassGetState.yaml
The tests fail by matching the
door
intent sentence, instead of thegarage_door
sentence, due to the fact that I have a (very commonly named)Garaj
area, which is also part of thegarage_door
device class name:The text was updated successfully, but these errors were encountered: