#Hi Guys I have an automation im
1 messages · Page 1 of 1 (latest)
This is the template (its repeated atleast 20 times in the automation with variations)
@sweet pond You can't use !input inside a Jinja template. First declare a variables: in your action block, pass the !input to the variable, then reference that variable in your template.
@stone shoal That is true, but I don't believe I see any !inputs in his templates....
Did these resolve ok in the old automation or in the developer template test area?
and you can try the other states format so if they are empty it won't error.
https://www.home-assistant.io/docs/configuration/templating/#states
A BP is basically an automation with presettable variables.
(Unless it's a script BP, then it's a script.)
@austere valley line 19 in ☝️
I looked at the BP, not there. He just has the syntax wrong.
value: {{ states('number.ohmega_charging_amps') | int(0) ) + 1 }}
Try that...
Don't forget to add some default value for int, float, etc...
@sweet pond
Thanks guys.
My problem however is that I need the variable to always reflect the "number.ohmega_charging_amps" does the variable get updated whenever the entity is updated ? Or will I have to update the variable myself ? Do you know I can update it to call the input variable again ?
thank you for this! I think I forgot to add the default value. This mucked up the testing for me. Cheers!!