Template Help Required, how do I set one helper input_number value from another

Hi I am playing around with the Template editor trying to learn. This works and prints on the screen the correct value

{% set myvalue = (states('input_number.value_one')|float-1) %}
{{ myvalue}}

But I want to set another helper from this helper and this does not work

{% set (states('input_number.value_two') = (states('input_number.value_one')|float-1) %}

What am I doing wrong, simple I know but I want to lean

Re Dave

You can’t change the state value from a template alone, you need to use a Service call… for example in an automation, script, or the Services tool in Developer Tools.

service: input_number.set_value
target:
  entity_id: input_number.value_two
data:
  value: "{{ states('input_number.value_one') | float - 1 %}"

Many thanks for taling the time to reply, always learning :slight_smile: