Input_number.set_value from template

Hey Guys,

I feel really stupid but I can’t get this to work & need your help.

I want to use the title of google calendar event to set a value to an input_number.
This is the (working) template:

{{state_attr("calendar.heizung_test","message") | replace (' Grad','')|float(0)}}

As you can see it returns the number 66.

But when I try to use this in a service call to set the input_number I get:

This is how I call the service:

service: input_number.set_value
data_template:
  value: "{{ state_attr("calendar.heizung_test","message") | replace (' Grad','')|float(0)}}"
target:
  entity_id: input_number.test_thermostat

Any help would be highly appreciated.
Cheers
Chris

You’re using the same quotes on the outside of the template as on the inside. Notice how your highlighting is all goofy in your posted code?

 value: "{{ state_attr('calendar.heizung_test','message') | replace (' Grad','')|float(0) }}"
1 Like

Oooof…

Thank you so much Petro.

Cheers
Chris

1 Like