From 2e0193ea0dc1d16eab1f1650a6f33af6cf7495e4 Mon Sep 17 00:00:00 2001 From: Nick Touran Date: Sat, 18 Jun 2016 12:20:06 -0700 Subject: [PATCH] Added example of using template in shell_command. (#547) --- source/_components/shell_command.markdown | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/_components/shell_command.markdown b/source/_components/shell_command.markdown index 00551f9b65c..1783c8a2980 100644 --- a/source/_components/shell_command.markdown +++ b/source/_components/shell_command.markdown @@ -26,3 +26,20 @@ Configuration variables: - Alias for the command - Command itself. + +The commands can be dynamic, using templates to insert values of other entities. For example + +```yaml +# Apply value of a GUI slider to the shell_command +input_slider: + ac_temperature: + name: A/C Setting + initial: 24 + min: 18 + max: 32 + step: 1 +{% raw %} +shell_command: + set_ac_to_slider: 'irsend SEND_ONCE DELONGHI AC_{{ states.input_slider.ac_temperature.state}}_AUTO' +{% endraw %} +```