From f8c98b3350e751bd467213f9978e9d7b01ac59aa Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 21 Sep 2015 18:54:38 -0700 Subject: [PATCH] Update automation --- source/components/automation.markdown | 39 +++++++++++------- .../images/components/automation/logbook.png | Bin 0 -> 3477 bytes 2 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 source/images/components/automation/logbook.png diff --git a/source/components/automation.markdown b/source/components/automation.markdown index 9b517394a25..65039a51d46 100644 --- a/source/components/automation.markdown +++ b/source/components/automation.markdown @@ -40,13 +40,15 @@ automation: ```

-All configuration entries have to be sequential. If you have automation:, automation 2: and automation 4: then the last one will not be processed. +All configuration entries have to be sequential. If you have automation:, +automation 2: and automation 4: then the last one will not be processed.

- [Jump to conditions](#conditions) - [Jump to actions](#actions) + - [Jump to troubleshooting](#troubleshooting) -### {% linkable_title Triggers %} +## {% linkable_title Triggers %} Triggers are what starts the processing of an automation rule. It is possible to specify multiple triggers for the same rule. Once a trigger starts, Home Assistant will validate the conditions, if any, @@ -80,7 +82,8 @@ automation: ``` #### {% linkable_title Numeric state trigger %} -On state change of a specified entity, attempts to parse the state as a number and triggers if value is above and/or below a threshold. +On state change of a specified entity, attempts to parse the state as a number and triggers if value +is above and/or below a threshold. ```yaml automation: @@ -106,7 +109,8 @@ automation: ```

- Use quotes around your values for from and to to avoid the YAML parser interpreting some values as booleans. + Use quotes around your values for from and to to avoid the YAML parser + interpreting some values as booleans.

#### {% linkable_title Sun trigger %} @@ -144,11 +148,12 @@ automation: - sun ``` -You can use `weekday` to limit the trigger times to speific days as well (also available in conditions). Valid values for `weekday` are (sun, mon, tue, wed, thu, fri & sat) +You can use `weekday` to limit the trigger times to speific days as well (also available in conditions). +Valid values for `weekday` are (`sun`, `mon`, `tue`, `wed`, `thu`, `fri` & `sat`) The above example will trigger on Saturday and Sunday every hour on the 5 (2:05, 3:05, 4:05, etc). -### {% linkable_title Conditions %} +## {% linkable_title Conditions %} Conditions are an optional part of an automation rule and be used to prevent an action from happening when triggered. Conditions look very familiar to triggers but are very different. A trigger will look @@ -216,7 +221,7 @@ automation: Valid values for `weekday` are (sun, mon, tue, wed, thu, fri & sat) -### {% linkable_title Actions %} +## {% linkable_title Actions %} When an automation rule fires, it calls a service. For this service you can specify an entity id it should apply to and optional service parameters (to specify for example the brightness). @@ -247,15 +252,19 @@ If you want to specify multiple services to be called or include a delay, have a [script component](/components/script.html). If you want to describe how certain entities should look, check out the [scene component](/components/scene.html). -Troubleshooting Tip: You can verify that your automation rules are being initialized correctly by watching both the realtime logs and also the `logbook`. The realtime logs will show the rules being initialized (once for each trigger) +## {% linkable_title Troubleshooting %} + +You can verify that your automation rules are being initialized correctly by watching both the realtime +logs and also the logbook. The realtime logs will show the rules being initialized (once for each trigger): + ```bash -INFO (MainThread) [homeassistant.components.automation] Initialized rule Rainy Day -INFO (MainThread) [homeassistant.components.automation] Initialized rule Rainy Day -INFO (MainThread) [homeassistant.components.automation] Initialized rule Rainy Day -INFO (MainThread) [homeassistant.components.automation] Initialized rule Rain is over +INFO [homeassistant.components.automation] Initialized rule Rainy Day +INFO [homeassistant.components.automation] Initialized rule Rainy Day +INFO [homeassistant.components.automation] Initialized rule Rainy Day +INFO [homeassistant.components.automation] Initialized rule Rain is over ``` -The `LogBook` component will show a line entry when an automoation is triggered. You can look at the previous entry to determine which trigger in the rule triggered the event.
- -![Sample](http://i.imgur.com/2s1ukCb.png) +The Logbook component will show a line entry when an automation is triggered. You can look at the +previous entry to determine which trigger in the rule triggered the event. +![Logbook example](/images/components/automation/logbook.png) diff --git a/source/images/components/automation/logbook.png b/source/images/components/automation/logbook.png new file mode 100644 index 0000000000000000000000000000000000000000..69563ef8f6ccad19cd581a2634c592ca1ec667d7 GIT binary patch literal 3477 zcmbVPc{mgf^IvzxI-;;xgjOu;2x%R=j&hVM>qyCctlYV8LWSI$D3FnP;APX6E_KGf&M-ZUWDN&H(@bprL`D1pvT+ zJhe5?FrFfge#_%jF$7xN)B#|}gjY`;W_RT6(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