Input Slider not working while changing AC temperature

Hi,
I am turning ON and OFF my AC through HA. Now i want to change the temperature too using the input slider but i am unable to do it.i am pasting the code below if anyone knows what i am doing wrong kindly tell me.

automation:
  - alias: run_set_ac
    trigger:
      platform: state
      entity_id: input_slider.ac_temperature
    action:
      service: script.set_ac_to_slider    
    
    
    
input_slider:
  ac_temperature:
    name: A/C Setting
    initial: 24
    min: 20
    max: 24
    step: 2

this is script.yaml

set_ac_to_slider:
  alias: AC ON
  sequence:
    - service: shell_command.set_ac_to_slider
ac_off:
  alias: AC OFF
  sequence:
    - service: shell_command.ac_off

this is shell_command.yaml

ac_on: irsend SEND_ONCE Orientac ACon_24
ac_off: irsend SEND_ONCE Orientac OFF
ac_low: irsend SEND_ONCE Orientac AClow
set_ac_to_slider: 'irsend SEND_ONCE Orientac ACon_{{ states.input_slider.ac_temperature.state }}'