Home Assistant updated

The Home Assistant updated trigger fires once, after Home Assistant has started on a different version than it ran before, not only after an update. It doesn’t fire on a normal restart.

Use it to do something after an update, for example, to send a notification with the version you updated from and to, or to reload something that needs the new version.

Using this trigger from the user interface

If you prefer building automations visually, Home Assistant walks you through this trigger step by step. You pick what to watch, tweak a few options, and save. No YAML knowledge required.

To use this trigger in an automation:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation, or select Create automation > Create new automation.
  3. In the When section, select Add trigger.
  4. From the search box, search for and select Home Assistant updated.
  5. Select Save.

Using this trigger 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. For how an automation is built in YAML, refer to Automations in YAML.

In YAML, put the settings that are specific to this trigger under options. Keep target, if the trigger uses one, and general settings such as id, alias, enabled, and variables at the top level, next to trigger.

When this trigger starts an automation, it passes data about what happened to the automation. You can use this trigger data in the templates of your conditions and actions. To see which data is available, refer to Trigger data in templates.

In YAML, refer to this trigger as homeassistant.updated. It has no options:

TriggerA trigger is the part of an automation that makes the automation start when something specific happens, for example, when the sun sets, a door opens, or a button is pressed. [Learn more]
trigger: homeassistant.updated

Trigger variables

When the trigger reacts, the trigger variable contains the following data:

  • trigger.from_version: The version that Home Assistant ran before.
  • trigger.to_version: The version that Home Assistant runs now.

For the data that all triggers include, refer to Trigger data in templates.

Good to know

  • The trigger fires when Home Assistant has finished starting, once per version change.
  • A downgrade, for example, after you restore an older backup, also counts as a version change.
  • The automation must be turned on when Home Assistant starts. If you create or turn on the automation later, the trigger doesn’t fire until the next update.
  • To run an automation on every start of Home Assistant, not only after an update, use the Home Assistant trigger with Start.

Try it yourself

Ready to test this? Go to Settings > Automations & scenes, create a new automation, and add this trigger. Save the automation, and then make the trigger react. For example, change the state of the targeted entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more], turn on a light that the trigger monitors, or change its brightness. To check whether the automation ran, open its traces.

This trigger has no target entity to change. To test it, save and turn on the automation before the next Home Assistant version change. A normal restart won’t fire it, and Run actions doesn’t provide the version variables used by the notification example.

More examples

Real scenarios where this trigger fires 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 when they are available, or paste the YAML code.

Tip

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: Notify after an update

  • Trigger: Home Assistant updated
  • Action: Send a notification message
    • Target: My Device (notify.my_device)
    • Message: Home Assistant updated from {{ trigger.from_version }} to {{ trigger.to_version }}.
YAML example for an update notification
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Notify after a Home Assistant update"
triggers:
  - trigger: homeassistant.updated
actions:
  - action: notify.send_message
    target:
      entity_id: notify.my_device
    data:
      message: "Home Assistant updated from {{ trigger.from_version }} to {{ trigger.to_version }}."

Still stuck?

To find out why the trigger didn’t react, make the change that it should react to, and then open the traces of the automation. If the automation didn’t run, there’s usually no trace, but some triggers record a Did not trigger trace. For details, refer to Testing automations. For common problems and their solutions, refer to Troubleshooting automations.

If that doesn’t help, the Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the trigger you’re using and what you expected to happen, or share on our subreddit /r/homeassistant.

Tip

AI assistants like ChatGPT or Claude can also explain triggers or suggest the right one when you describe what you want in plain language.

Related triggers

Explore related triggers:

  • Home Assistant: Triggers when Home Assistant starts up or shuts down.

  • Restart required: Triggers when Home Assistant needs a restart to apply installed updates or changed settings.