For some reason it does not work, I don’t see any log messages either. First I had “| int” instead of float, which in the log msgs indicated that the service expected a float. When I put that template line in the Dev Tools Template input, it shows the value correctly (i.e. 19.5).
Also you need to put the template in quotes, otherwise the curly braces will be interpreted by the YAML parser as dictionary operators. And lastly, you don’t need the float filter. Input number entities are already numbers, and like all states, are string representations. So by using the float filter you’ll be taking the string representation of a float and converting it to a float. But then the output of a template is always a string, so it will just be converted back to a string. So basically the float filter in this case effectively does nothing.
Verwarming Living Hoog: Error executing script. Invalid data for call_service at pos 3: expected float for dictionary value @ data['temperature']
4:59:28
What makes it even more interesting if I do add the “| float” part, I don’t get any error but the setpoint doesn’t get applied.
Wait, so what was the automation when you got the error? It’s kind of hard to help without consistent data. I need to see the automation that caused the error.
So the third step in the automation actions does not use the input_number you’ve been asking about. It’s using input_number.verwarming_living_setpoint_high. What is its state?
EDIT: Also, when you use the automation with the hard coded values (i.e., not template), do you still get the error?
So when you use the templates instead of hard coded values, do you get the error every time the automation triggers, or just the first time? E.g., if you were to turn input_boolean.heating_living off and back on (to make it trigger), do you get the error every time? And do you get the error for each step that uses a template?
The way it was quoted is not common, but it isn’t wrong, and changing that will have no effect. And adding the int filter will just cause it to lose fractional degrees, which is probably not wanted. And, before you ask, adding a float filter will have no effect either.