in the intent script, it clearly recognises 70 as a number. However, if I try to use a wildcard such as {value} then instead of the number 70, put {{value}} in the intent script, am I hitting a formatting issue where the {{value}} variable is rendered as a something other than a number. In which case, something like {{value|int}} should work. But if that’s the case, why does {temp} and {{temp}} work in @jackjourneyman example work?
I did wonder if it’s because there is already a built-in intent to change the temperature of a climate entity, but there is no built-in intent that can change the value of an input_number helper.
If other commands with numeric values work, there is nothing wrong with the format.
Try removing
requires_context:
domain: "input_number"
Your phrase is unique enough that it won’t conflict with the built-in intents.
If that doesn’t help either, do the automation in the GUI, there’s less chance of error there, and all new variables are automatically assigned the wildcard type
language: "en"
intents:
SetCarBatteryLevel:
data:
- sentences:
- "(set|change) [the] car (battery charge|battery charge level) to {value} [percent]"
lists:
value:
range:
from: 0
to: 100
Now when I use the Assist sentence parser in Developer Tools to test the sentence by typing “set the car battery charge level to 90 percent” I get the following result:
So the intent is being correctly recognised. It’s obviously what I have in the intent_script that is not being correctly processed.
Here’s what’s in the intent_script.
First of all , my intent_script is in a file called intent_script.yaml which is correctly located in the homeassistant/ directory. I have correctly pointed my config towards it by having the line intent_script: !include intent_script.yaml
Inside the intent_script.yaml file I have