Issues with Updating Input_Number in a Script

I’m having an issue with what I think is the formatting for the value line _number. I’m attempting to increase the temperature setpoint by 1 degree (input_number.temp_setpoint) when I run the following script. When I run the script, the input_number does not update, and I’m also not seeing any errors in the logs. Can anyone help me out with this issue?

############################################################################
# HVAC - INCREASE SETPOINT                                                                                                #
############################################################################  
  hvac_setpoint_increase:
    alias: HVAC - Increase Setpoint
    sequence:
    - service: input_number.set_value
      data_template:
        entity_id: input_number.temp_setpoint   
        value: '{{ (states.input_number.temp_setpoint.state) + 1 | int) }}'

Convert to int first then + 1

2 Likes

Remove the right bracket right before the ‘|’, so it reads

value: '{{ (states.input_number.temp_setpoint.state | int ) + 1 }}'

To my oppinion the round bracket are obsolete anyhow. You can check the validity and resut of any expression using the “template” section in your local HA instance.

Thanks, that worked!