Hi, I want to create custom questions for Assist by creating a new intent and its response using an intent_script in configuration.yaml.
In the custom_sentences/es directory, I have a file, temperatures.yaml:
language: "es"
intents:
DiceTemperatura:
data:
- sentences:
- "[Dime [la ] ]temperatura [de[l| la]|en] {estancia}"
lists:
estancia:
values:
- in: "cocina"
out: "sensor.sensor_cocina_temperature"
- in: "dormitorio"
out: "sensor.sensor_dormitorio_temperature"
- in: "estudio"
out: "sensor.estudio_temperatura"
- in: "exterior"
out: "sensor.temperatura_exterior_combinada"
- in: "salón"
out: "sensor.sensor_salon_temperature"
- in: "dos hermanas"
out: "sensor.temperatura_en_dos_hermanas_montecillos"
- in: "sevilla"
out: "sensor.temperatura_en_sevilla"
- in: "mínima en sevilla"
out: "sensor.minima_en_sevilla"
- in: "máxima en sevilla"
out: "sensor.maxima_en_sevilla"
and in configuration.yaml I have the following:
intent_script:
DiceTemperatura:
speech:
text: "Hola, la temperatura es {{states('{{ estancia }}', with_unit=True)}}"
When I ask the assistant using the new intent, it always responds with “Hola, la temperatura es unknown.” That is, it recognizes the intent, but not the value of the entity in the list. The problem is how to write states('{{ estancia }}', with_unit=True) so that it recognizes the room I’m asking about, based on the values in the list. Any help is welcome. Thanks in advance.