mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-12 20:06:52 +00:00
Added example of using template in shell_command. (#547)
This commit is contained in:
parent
4039f0c507
commit
2e0193ea0d
@ -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…
x
Reference in New Issue
Block a user