Setting an number to a template (not input number)

Hello I have been trying to create a button that decrements my oven’s timer by 30 seconds. I can’t do this because my oven’s timer is a number and not an input number and therefore I cannot call the input number: decrement service. The only service is set. Please can someone tell me what I am doing wrong here

show_name: false
show_icon: true
type: button
  action: call-service
  service: number.set_value
  target: {}
      {{states('input_number.oven_timer') | float(0)}}
icon: mdi:minus
icon_height: 40px
entity: number.bosch_mba5785s6b_68a40e5fc6ef_230_bsh_common_setting_alarmclock

You have not specified which number to set (target).

The default button card doesn’t accept templates. As a workaround, you can create a script and call it when clicking the button.
The correct syntax is either

    value: >
      {{states('input_number.oven_timer') | int(30)}}


    value: "{{states('input_number.oven_timer') | int(30)}}"

1 Like

Thank You so much :slight_smile:

But please be aware of what Tom said.

yes i have taken this into account