#Syntax for using templates in data block?

1 messages · Page 1 of 1 (latest)

hoary kelp
#

You should share specifics of what you're trying, the exact error message and use script blocks to show the code. There shouldn't any issue w/ what you're trying to do

low skiffBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

fallow pumice
#

That requires a script with variables passed to it.

#

If you're just copy/pasting that, it's not going to work

#

Where are you trying that?

#

also, post the script

#

post the script then please

remote berry
#

it's at the top ☝️

fallow pumice
#

where? script.set_ith_param

remote berry
#

oh

fallow pumice
#

yes, the error is coming from him using input_temp as a string but the value using in the script from templates will be an int

#

that won't work

#

you need to treat it like an int in your conditions

#

because templates will always resolve that as an int

#
"{{ input_temp == 27 }}"
#

and then pass 27 without quotes

#

or a template

#

no, that can stay as is

#

your script needs to change to expect ints

#

👍