Need help with Input Select and Shell Command

I am trying to create a an input select for one of my IP cams.
Input select:

  livingroom_presets:
    name: Living Room Camera Preset
    options:
      - None
      - Living Room
      - Back Yard Door
      - Hallway
    initial: None
    icon: mdi:camera-switch

This si what I have for the Automation:

  - alias: Living Room Camera View
    trigger:
      platform: state
      entity_id: input_select.livingroom_presets
      to: "Living Room"
    action:
      service: shell_command.lv_cam_preset1
      data:
        cmd: 'curl -k "http://192.168.1.184/cgi-bin/decoder_control.cgi?type=2&cmd=0&user=admin&pwd=12345"'

is this the correct syntax?

You need to specify shell commands first:

shell_command:
  lv_cam_preset1: 'curl -k "http://192.168.1.184/cgi-bin/decoder_control.cgi?type=2&cmd=0&user=admin&pwd=12345"'

Check the manual:

Then, your automation:

  - alias: Living Room Camera View
    trigger:
      platform: state
      entity_id: input_select.livingroom_presets
      to: "Living Room"
    action:
      service: shell_command.lv_cam_preset1

@omeasire
Thanks for the quick reply. I have setup the automations like you suggested, it passes script test

hass --script check_config

But when I actually choose the input nothing happens. how can i emulate the shell command?

This is my shell_commands.yaml

shell_command:
  #Created a preset point in Living Room Web Interface
  lv_cam_preset1: 'curl -k "http://192.168.1.184/cgi-bin/decoder_control.cgi?type=2&cmd=0&user=admin&pwd=12345"'
  #Created a preset point
  lv_cam_preset2: 'curl -k "http://192.168.1.184/cgi-bin/decoder_control.cgi?type=2&cmd=1&user=admin&pwd=12345"'
  #Created a preset point
  lv_cam_preset3: 'curl -k "http://192.168.1.184/cgi-bin/decoder_control.cgi?type=2&cmd=2&user=admin&pwd=12345"'

Check this:

In Services Developer Tool choose a domain called ‘shell_command’, then choose your command in service list and click ‘Call service’

Did you get this to work? I’m trying the same to control a Dahua PTZ and calling the service does nothing on Hassio 0.82.1. Also tried on another system running 0.83.3, still no joy. When I paste that curl command into cURL for Windows however, it works.