Fire manual event
Use this action to fire an event. Other automations can react to it with a Manual event received trigger. This lets one automation or script tell another that something happened, and pass data along.
Using this action from the user interface
If you prefer building automations and scripts visually, Home Assistant walks you through this action step by step. You fill in a few options and save. No YAML knowledge required.
To fire an event from an automation or a script:
- Go to Settings > Automations & scenes and select an automation. To edit a script, go to the Scripts tab and select the script.
- In the Then do section of an automation, or the Sequence section of a script, select Add action.
- Search for and select Fire manual event.
- In Event type, enter the name of the event, for example,
event_light_state_changed. - Optional: In Event data, enter the data to send with the event, in YAML.
- Select Save.
Options in the UI
Using this action in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, use event with the event type, and optionally event_data:
event: MY_EVENT
event_data:
room: kitchen
The values in event_data can be templates.
Options in YAML
Good to know
- To fire an event by hand, for example, to test an automation that reacts to it, go to Settings > Tools > Events. For details, refer to Firing an event.
- To add an entry to the Activity panel, use the Log activity action.
More examples
Real scenarios where this action shows up in automations and scripts. Copy any example and adapt it to your setup. In the visual editor, select the UI options listed in the example or paste the YAML code.
You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the visual automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.
Automation: Fire a custom event when a switch turns on
When the kitchen switch turns on, this automation fires the custom event event_light_state_changed, with the new state as event data. The actions could also be part of a script.
YAML example
alias: "Fire event"
triggers:
- trigger: state
entity_id: switch.kitchen
to: "on"
actions:
- event: event_light_state_changed
event_data:
state: "on"
Automation: React to the custom event
This automation reacts to event_light_state_changed with a Manual event received trigger, and uses the state from the event data in a notification. For the data you can use, refer to available trigger data.
YAML example
alias: "Capture event"
triggers:
- trigger: event
event_type: event_light_state_changed
actions:
- action: notify.notify
data:
message: "The kitchen light is turned {{ trigger.event.data.state }}."
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the action you’re calling and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.
Related actions
Explore related actions:
- Log activity: Adds a custom entry to the Activity panel.