diff --git a/source/_components/shell_command.markdown b/source/_components/shell_command.markdown index b50d8f00a0c..15f81dea59d 100644 --- a/source/_components/shell_command.markdown +++ b/source/_components/shell_command.markdown @@ -25,12 +25,14 @@ shell_command: restart_pow: touch ~/.pow/restart.txt ``` -Configuration variables: +{% configuration %} +alias: + description: Give the shell command a name (alias) as a variable and set the command you want to execute after the colon. e.g., `alias`:`the shell command you want to execute`. + required: true + type: string +{% endconfiguration %} - - Alias for the command - - Command itself. - -The commands can be dynamic, using templates to insert values for arguments. When using templates, shell_command runs in a more secure environment which doesn't allow any shell helpers like automatically expanding the home dir `~` or using pipe symbols to run multiple commands. Similarly, only content after the first space can be generated by a template. This means the command name itself cannot be generated by a template, but it must be literally provided. +The commands can be dynamic, using templates to insert values for arguments. When using templates, shell_command runs in a more secure environment which doesn't allow any shell helpers like automatically expanding the home dir `~` or using pipe symbols to run multiple commands. Similarly, only content after the first space can be generated by a template. This means the command name itself cannot be generated by a template, but it must be literally provided. Any service data passed into the service call to activate the shell command will be available as a variable within the template. @@ -54,7 +56,7 @@ input_number: min: 18 max: 32 step: 1 - + {% raw %} shell_command: set_ac_to_slider: 'irsend SEND_ONCE DELONGHI AC_{{ states.input_number.ac_temperature.state }}_AUTO'