But now I always get error:
" …template error: int got invalid input ‘states(‘input_number.nibe_heizkurve_verschiebung_manual’)’ when rendering…"
The ‘parameter’ get not rendered to his value, instead it always was taken as string …
also trying value in “” or ‘’ does not help …
→ ANY IDEAS ?
Thanks an best wishes, Clemens.
Hi Jack, thanks for Reply.
also “float” would not help: then I get same error with float: Template error: float got invalid input ‘states(‘input_number.nibe_heizkurve_verschiebung_manual’)’ when rendering …
Problem is that the script generell use the parameter as string and are not willing to render it as {{ parameter }} … also not into the variable value_b, even into the variable value_a … ??
AND: if I put the same code of the script direct into a action it works fine … ??? The problem is the “not rendering” of the given parameter …!
→ now its always a string that would be transferred:
THIS WORKED. BUT: now the script if not so universal, because the parameter now is an entity-id !
If I want to input a number, for example from a calculation I cannot use the same script. …
Maybe I will take this nevertheless as work around: using then the script without parameter (so use always the same entity) and writing the value calculated before to this entity.
Maybe some other find out, how to give a state of an entity to a script as parameter [I cannot believe, that thhis is not possible!] .
Thanks, Clemens.
HA have a lot of those bumps in places and other places do not have the same limitations.
I think it has something to do with when the code was made.
The newer the code the higher the chance of support for templates.
You should be able to run tests on if the input is a number or not and then act on, but I agree the template solution would be better and I suggest you make a WTH post about it.
It is exactly what the WTH section is about.