mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 13:56:53 +00:00
Add automation example with templating (#4066)
* Add automation example with templating * Fix escaping
This commit is contained in:
parent
1396b6410f
commit
1ef64b2cc5
@ -12,6 +12,7 @@ redirect_from: /getting-started/automation-examples/
|
||||
|
||||
Just some sample automation rules to get you started.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
# Example of entry in configuration.yaml
|
||||
automation:
|
||||
@ -64,4 +65,20 @@ automation:
|
||||
service: notify.notify
|
||||
data:
|
||||
message: 'Paulus left the house'
|
||||
|
||||
# Send a notification via Pushover with the event of a Xiaomi cube. Custom event from the Xiaomi component.
|
||||
- alias: 'Xiaomi Cube Action'
|
||||
hide_entity: false
|
||||
initial_state: false
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: cube_action
|
||||
event_data:
|
||||
entity_id: binary_sensor.cube_158d000103a3de
|
||||
action:
|
||||
- service_template: notify.pushover
|
||||
data_template:
|
||||
title: "Cube event detected"
|
||||
message: "Cube has triggered this event: {{ trigger.event }}"
|
||||
```
|
||||
{% endraw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user