Feed an input_number variable into input_number.set_value action in Automations UI

I am trying to change an input_number within an Automation.

When I define an absolute number, everything runs smoothly:

However, when I try to use another input_number, it does not work:

I have tried the following combinations in the “Service data” field after reading through some documentation and past forum topics:

value: {{input_number.temperature_day}}
value: '{{input_number.temperature_day}}'
value: states(input_number.temperature_day)
value: {{states('input_number.temperature_day')}}
value: '{{states('input_number.temperature_day')}}'

But nothing works. Any hints how to proceed?

value: '{{states('input_number.temperature_day') | float }}'

should do.

Thank you for the fast response. Your proposed solution does not work for me: the value of input_number.temperature_current does not change.

Screenshot:

I copied the errors in the log:

Logger: homeassistant.components.automation.schedule_set_temperature
Source: helpers/script.py:1147
Integration: Automation (documentation, issues)
First occurred: 11:24:17 (1 occurrences)
Last logged: 11:24:17

Determine Set Temperature: Error executing script. Invalid data for call_service at pos 1: expected float for dictionary value @ data[‘value’]

Logger: homeassistant.components.automation.schedule_set_temperature
Source: components/automation/init.py:408
Integration: Automation (documentation, issues)
First occurred: 11:24:17 (1 occurrences)
Last logged: 11:24:17

Error while executing automation automation.schedule_set_temperature: expected float for dictionary value @ data[‘value’]

You need to mix double quotes with single quotes (or use double-single-quotes), otherwise you break the YaML

value: "{{ states('input_number.temperature_day') | float }}"

or

value: '{{ states(''input_number.temperature_day'') | float }}'
1 Like

Thanks, your suggestion to use double quotes fixed it! Now it behaves like expected.