#May we see the custom sentence and the
1 messages · Page 1 of 1 (latest)
### TEST
intent_script:
DimLights:
action:
service: "light.turn_on"
target:
entity_id: "{{ light }}"
data:
brightness_pct: 10
speech:
text: "Dimmed to {{ brightness }}"
###
and the sentence:
language: "en"
intents:
DimLights:
data:
- sentences:
- "(dim|set|change) the {light} to {brightness} [percent]"
lists:
light:
values:
- in: "lamp"
out: "light.craftroom_lamp"
brightness:
range:
from: 0
to: 100
while I am aware that the script will only dim the light to 10%, I am just trying to get it to do anything before I set the variable here
I can't test right now but if I were you I would simplify the custom sentence a little bit and try to see which aspect of it causes the failure
So trim "percent" at the end, for example, and similar things, until it manages to grab on to the sentence you made. You can also use dev tools and listen for assist events, you might be able to see, for example, whether it just can't understand what you're saying
But I assume it's not having issues understanding you bc it's just this one script
It understands what is being said according to the log (esphome), t's just not meshing with the intents ... which is odd.
I'll try what you've suggested though and let ya know what happens, if anything
[13:46:59][D][voice_assistant:655]: Speech recognised as: " dim the lamp to 90%."
[13:46:59][D][voice_assistant:627]: Event Type: 5
[13:46:59][D][voice_assistant:660]: Intent started
[13:46:59][D][voice_assistant:627]: Event Type: 6
[13:46:59][D][voice_assistant:627]: Event Type: 7
[13:46:59][D][voice_assistant:683]: Response: "Sorry, I am not aware of any device called dim the lamp"
{brightness}[[ ](percent|%)]
As you can see, the transcribed text contains %. You can take inspiration from the built-in intent sentences https://github.com/home-assistant/intents/blob/69f1c622477dcac3b39035370aaba3621c2e07b7/sentences/en/_common.yaml#L363