mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 13:56:53 +00:00
Merge pull request #4517 from home-assistant/skalavala-patch-1
added code to escape jinja code.
This commit is contained in:
commit
5b1e86c32f
@ -147,6 +147,7 @@ The following automation shows how to raise a custom event called `event_light_t
|
|||||||
|
|
||||||
The following automation shows how to capture the custom event `event_light_turned_on`, and retrieve corresponsing `entity_id` that was passed as the event data.
|
The following automation shows how to capture the custom event `event_light_turned_on`, and retrieve corresponsing `entity_id` that was passed as the event data.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
- alias: Capture Event
|
- alias: Capture Event
|
||||||
trigger:
|
trigger:
|
||||||
@ -157,7 +158,7 @@ The following automation shows how to capture the custom event `event_light_turn
|
|||||||
data_template:
|
data_template:
|
||||||
message: "{{ trigger.event.data.entity_id }} is turned on."
|
message: "{{ trigger.event.data.entity_id }} is turned on."
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
[Script component]: /components/script/
|
[Script component]: /components/script/
|
||||||
[automations]: /getting-started/automation-action/
|
[automations]: /getting-started/automation-action/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user