How to replace present value per the 'initial' attribute value of an input_number entity via automation

`

hi,
when i put a number, for instance 8, it works but when i try to put the initial value that i get with "state_attr('input_number.slider002', 'initial')" it doesn't work 

thanks for your help

my automation.yaml file : 
- id: '1587734644116161'
  alias: Re-init profil mi-saison RDC
  description: ''
  trigger:
  - entity_id: input_boolean.reinit_profil_misaison_rdc
    platform: state
  condition: []
  action:
  - data:
      value: 8
    entity_id: input_number.slider000
    service: input_number.set_value
  - data:
      value: state_attr('input_number.slider002', 'initial')
    entity_id: input_number.slider002
    service: input_number.set_value`

i found the solution:

  - service: input_number.set_value
    data_template:
      value: "{{ state_attr('input_number.slider002', 'initial') }}"
      entity_id: input_number.slider002`

``````````