diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index fd9d06520ae..3686190a619 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -15,6 +15,8 @@ Triggers are what starts the processing of an automation rule. It is possible to ### {% linkable_title Event trigger %} Triggers when an event is being processed. Events are the raw building blocks of Home Assistant. You can match events on just the event name or also require specific event data to be present. +Events can be fired by components or via the API. There is no limitation to the types. A list of built-in events can be found [here](/docs/configuration/events/). + ```yaml automation: trigger: @@ -24,7 +26,22 @@ automation: event_data: mood: happy ``` -For example, to carry out actions when Home Assistant starts, you can use `event_type: homeassistant_start`. See other 'events' supported by Home Assistant [here](https://home-assistant.io/topics/events/). + +

+ Starting 0.42, it is no longer possible to listen for event `homeassistant_start`. Use the 'homeassistant' platform below instead. +

+ +### {% linkable_title Home Assistant trigger %} + +Use this platform to trigger when Home Assistant starts up and shuts down. + +```yaml +automation: + trigger: + platform: homeassistant + # Event can also be 'shutdown' + event: start +``` ### {% linkable_title MQTT trigger %} Triggers when a specific message is received on given topic. Optionally can match on the payload being sent over the topic. @@ -62,7 +79,7 @@ automation: trigger: platform: state entity_id: device_tracker.paulus, device_tracker.anne_therese - # Optional + # Optional from: 'not_home' to: 'home' @@ -105,6 +122,8 @@ automation: value_template: "{% raw %}{% if is_state('device_tracker.paulus', 'home') %}true{% endif %}{% endraw %}" ``` +[template]: /docs/configuration/templating/ + ### {% linkable_title Time trigger %} Time can be triggered in many ways. The most common is to specify `after` and trigger at a specific point in time each day. Alternatively, you can also match if the hour, minute or second of the current time has a specific value. You can prefix the value with a `/` to match whenever the value is divisible by that number. You cannot use `after` together with hour, minute or second. diff --git a/source/_includes/asides/docs_navigation.html b/source/_includes/asides/docs_navigation.html index 771ac9b3035..5839ef04b86 100644 --- a/source/_includes/asides/docs_navigation.html +++ b/source/_includes/asides/docs_navigation.html @@ -41,9 +41,14 @@
  • {% active_link /docs/configuration/secrets/ Storing Secrets %}
  • {% active_link /docs/configuration/templating/ Templating %}
  • {% active_link /docs/configuration/group_visibility/ Group Visibility %}
  • +
  • {% active_link /docs/configuration/platform_options/ Entity component platform options %}
  • + + +
  • + Core objects +