mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 01:06:52 +00:00
Add homeassistant automation platform docs
This commit is contained in:
parent
da05d9ab68
commit
2f52a6a5a5
@ -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/).
|
||||
|
||||
<p class='note warning'>
|
||||
Starting 0.42, it is no longer possible to listen for event `homeassistant_start`. Use the 'homeassistant' platform below instead.
|
||||
</p>
|
||||
|
||||
### {% 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.
|
||||
|
@ -41,9 +41,14 @@
|
||||
<li>{% active_link /docs/configuration/secrets/ Storing Secrets %}</li>
|
||||
<li>{% active_link /docs/configuration/templating/ Templating %}</li>
|
||||
<li>{% active_link /docs/configuration/group_visibility/ Group Visibility %}</li>
|
||||
<li>{% active_link /docs/configuration/platform_options/ Entity component platform options %}</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Core objects
|
||||
<ul>
|
||||
<li>{% active_link /docs/configuration/events/ Events %}</li>
|
||||
<li>{% active_link /docs/configuration/state_object/ State Objects %}</li>
|
||||
<li>{% active_link /docs/configuration/platform_options/ Entity component platform options %}</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user