Question about input numbers in template

Good evening all,

Is it possible to replace the fixed values in the template below with input numbers?

  - platform: template
    sensors:
      current_electricity_rate:
        friendly_name: Current Electricity Rate
        value_template: >-
          {% set t = strptime(states('sensor.time'), '%H:%M') %}
          {%- if t.hour >=6 and t.hour <22 -%}0.2648
     # replace 0.2648 to
     #input_number.t1_energy_cost
          {%- else -%}0.2124
     # replace 0.2124 to
     #input_number.t2_energy_cost
          {%- endif -%}
        unit_of_measurement: €/kWh

I have tried several options to implement this but have not been successful so far.

Does anyone have an idea how I can do this?

Thanks in advance

  - platform: template
    sensors:
      current_electricity_rate:
        friendly_name: Current Electricity Rate
        value_template: |-
          {%- if  22 > now().hour >= 6 -%}
            {{ states('input_number.t1_energy_cost') }}
          {%- else -%}
            {{ states('input_number.t2_energy_cost') }}
          {%- endif -%}
        unit_of_measurement: €/kWh

Wow, that’s fast.

Thanks.

p.s.
Where can I find the button “this is the solution” ?