add automation code. (#2015)
the example makes it seem like the magic happens without an automation
This commit is contained in:
parent
5653c3081b
commit
e4fff883f9
1 changed files with 11 additions and 1 deletions
|
@ -33,7 +33,16 @@ The commands can be dynamic, using templates to insert values of other entities.
|
|||
Any service data passed into the service call to activate the shell command will be available as a variable within the template.
|
||||
|
||||
```yaml
|
||||
|
||||
# Apply value of a GUI slider to the shell_command
|
||||
automation:
|
||||
- alias: run_set_ac
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_slider.ac_temperature
|
||||
action:
|
||||
service: shell_command.set_ac_to_slider
|
||||
|
||||
input_slider:
|
||||
ac_temperature:
|
||||
name: A/C Setting
|
||||
|
@ -41,6 +50,7 @@ input_slider:
|
|||
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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue