Unable to get input_number.set_value ,automation and templates help

WTH,Unable to get input_number.set_value ,automation and templates help

like this

alias: tesla P
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.tesla_shift_state
    to: P
condition: []
action:
  - service: input_number.set_value
    data_template:
      entity_id: input_number.tesla_odo_since_last_p_base
      value: "{{states('sensor.tesla_odometer') | float }}"
mode: single
template:
  - sensor:
      - name: tesla odo since last p base
        unique_id: "tesla_odo_since_last_p_base"
        icon: mdi:thermometer
        unit_of_measurement: "km"
        state: >-
           {{ (states('input_number.tesla_odo_since_last_p_base') }}

Do the input_number helper contain the value?
And why not just use the input_number as the sensor directly?
It can have all the needed attributes.