Added example of using template in shell_command. (#547)
This commit is contained in:
parent
4039f0c507
commit
2e0193ea0d
1 changed files with 17 additions and 0 deletions
|
@ -26,3 +26,20 @@ Configuration variables:
|
||||||
|
|
||||||
- Alias for the command
|
- Alias for the command
|
||||||
- Command itself.
|
- 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 %}
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue