From 94aedbd41502241c7d92658b8c0f752572bc68f9 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 5 Feb 2021 13:46:32 +0100 Subject: [PATCH] Tweak "event" script action documentation (#16400) --- source/_docs/scripts.markdown | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/_docs/scripts.markdown b/source/_docs/scripts.markdown index 2b6b75b3fe3..d17ef32caf0 100644 --- a/source/_docs/scripts.markdown +++ b/source/_docs/scripts.markdown @@ -272,6 +272,8 @@ This action allows you to fire an event. Events can be used for many things. It You can also use event_data to fire an event with custom data. This could be used to pass data to another script awaiting an event trigger. +The `event_data` accepts templates. + {% raw %} ```yaml @@ -285,7 +287,7 @@ an event trigger. ### Raise and Consume Custom Events -The following automation shows how to raise a custom event called `event_light_state_changed` with `entity_id` as the event data. The action part could be inside a script or an automation. +The following automation example shows how to raise a custom event called `event_light_state_changed` with `entity_id` as the event data. The action part could be inside a script or an automation. ```yaml - alias: Fire Event @@ -299,7 +301,7 @@ The following automation shows how to raise a custom event called `event_light_s state: "on" ``` -The following automation shows how to capture the custom event `event_light_state_changed`, and retrieve corresponding `entity_id` that was passed as the event data. +The following automation example shows how to capture the custom event `event_light_state_changed` with an [Event Automation Trigger](/docs/automation/trigger#event-trigger), and retrieve corresponding `entity_id` that was passed as the event trigger data, see [Available-Trigger-Data](/docs/automation/templating/#available-trigger-data) for more details. {% raw %}