Pass value to command line

In your shell_command, just use:

shell_command:
  light_dim: '/usr/local/bin/light_dim.sh {{ value }}'

Then, in your automation,

  action: 
    - service: shell_command.light_dom
      data_template:
        value: >
          {% template logic to determine value to send %}

“value” is passed as an argument to the shell_command.

5 Likes