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


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: ''
  - entity_id: input_boolean.reinit_profil_misaison_rdc
    platform: state
  condition: []
  - 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
      value: "{{ state_attr('input_number.slider002', 'initial') }}"
      entity_id: input_number.slider002`