Added event_data_template (#4180)
* Added event_data_template * Update scripts.markdown
This commit is contained in:
parent
6525969cfc
commit
122a77bc82
1 changed files with 10 additions and 0 deletions
|
@ -124,6 +124,16 @@ event_data:
|
||||||
entity_id: device_tracker.paulus
|
entity_id: device_tracker.paulus
|
||||||
domain: light
|
domain: light
|
||||||
```
|
```
|
||||||
|
You can also use event_data_template to fire an event with custom data. This could be used to pass data to another script awaiting
|
||||||
|
an event trigger.
|
||||||
|
```
|
||||||
|
event: MY_EVENT
|
||||||
|
event_data_template:
|
||||||
|
name: myEvent
|
||||||
|
customData: "{{ myCustomVariable }}"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Script component]: /components/script/
|
[Script component]: /components/script/
|
||||||
[automations]: /getting-started/automation-action/
|
[automations]: /getting-started/automation-action/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue