New to HA and scripting error

I am trying to run the script and having a hard time running the given sample; It seems like something is wrong with my configuration. Please help me what I am doing wrong.

I am following this example - Shell Command - Home Assistant

Apply value of a GUI slider to the shell_command

automation:

  • alias: “run_set_ac”
    trigger:
    platform: state
    entity_id: input_number.ac_temperature
    action:
    service: shell_command.set_ac_to_slider

input_number:
ac_temperature:
name: A/C Setting
initial: 24
min: 18
max: 32
step: 1

shell_command:
set_ac_to_slider: ‘irsend SEND_ONCE DELONGHI AC_{{ states(“input_number.ac_temperature”) }}_AUTO’

I am getting the following error,

Logger: homeassistant.components.automation
Source: components/automation/config.py:108
Integration: Automation (documentation, issues)
First occurred: 11:20:42 AM (2 occurrences)
Last logged: 11:20:42 AM

Unnamed automation could not be validated and has been disabled: extra keys not allowed @ data[‘automation’]. Got [{‘alias’: ‘run_set_ac’, ‘trigger’: {‘platform’: ‘state’, ‘entity_id’: ‘input_number.ac_temperature’}, ‘action’: {‘service’: ‘shell_command.set_ac_to_slider’}}] extra keys not allowed @ data[‘input_number’]. Got {‘ac_temperature’: {‘name’: ‘A/C Setting’, ‘initial’: 24, ‘min’: 18, ‘max’: 32, ‘step’: 1}} extra keys not allowed @ data[‘shell_command’]. Got {‘set_ac_to_slider’: ‘irsend SEND_ONCE DELONGHI AC_{{ states(“input_number.ac_temperature”) }}_AUTO’} required key not provided @ data[‘action’]. Got None required key not provided @ data[‘trigger’]. Got None

I am my own script based on same format and having similar issue with my script also. I think as long as if above example works, I think my script will also work. I am not sure what I am doing wrong here.

Please format your code correctly — see here:

There could be all sorts of indentation errors that we can’t see without the correct formatting.

Where did you put this? The general convention in the documentation is to give examples as if they are being added directly to the configuration.yaml file.