# Recipe - Home Assistant Restart

Source: https://supernotify.rhizomatics.org.uk/latest/recipes/restart_email/

## Purpose

Send an email when Home Assistant restarts with some basic information about the installation.

## Implementation

An HTML template is used to pull in values from Home Assistant's self-monitoring entities.

## Example Configuration

default.html.j2

```yaml
automations:
- id: notify-restart
  alias: Notify on HomeAssistant start up
  triggers:
    - event: start
      trigger: homeassistant
  action:
      action: supernotify.notify
      data:
        title: "Home Assistant Restart"
        message: "Home Assistant has started up."
        message_html: |
          <table>
            <tr>
              <th>Component</th><th>Installed Version</th><th>Latest Version</th>
            </tr>
            <tr>
              <td>Core</td>
              <td>{{ states.update.home_assistant_supervisor_update.attributes['installed_version']}}</td>
              <td>{{ states.update.home_assistant_supervisor_update.attributes['latest_version']}}</td>
            </tr>
            <tr>
              <td>Supervisor</td>
              <td>{{ states.update.home_assistant_core_update.attributes['installed_version']}}</td>
              <td>{{ states.update.home_assistant_core_update.attributes['latest_version']}}</td>
              </tr>
            <tr>
              <td>OS</td>
              <td>{{ states.update.home_assistant_operating_system_update.attributes['installed_version']}}</td>
              <td>{{ states.update.home_assistant_operating_system_update.attributes['latest_version']}}</td>
            </tr>
          <table>
```
