Added Rule info from Logs & Logbook

Added in a troubleshooting tip on what to look for in the logbook and the real-time logs for initialized automation rules.
Also added "```yaml" to some of the examples that didn't have it.
This commit is contained in:
Carlo Costanzo 2015-09-21 12:59:28 -04:00
parent a6f89c7ebc
commit eb63378735

View File

@ -221,7 +221,7 @@ Valid values for `weekday` are (sun, mon, tue, wed, thu, fri & sat)
When an automation rule fires, it calls a service. For this service you can specify an entity id it 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). should apply to and optional service parameters (to specify for example the brightness).
``` ```yaml
automation: automation:
# Change the light in the kitchen and living room to 150 brightness and color red. # Change the light in the kitchen and living room to 150 brightness and color red.
action: action:
@ -234,7 +234,7 @@ automation:
rgb_color: [255, 0, 0] rgb_color: [255, 0, 0]
``` ```
``` ```yaml
automation: automation:
# Notify me on my mobile phone of an event # Notify me on my mobile phone of an event
action: action:
@ -246,3 +246,16 @@ automation:
If you want to specify multiple services to be called or include a delay, have a look at the If you want to specify multiple services to be called or include a delay, have a look at the
[script component](/components/script.html). If you want to describe how certain entities should look, [script component](/components/script.html). If you want to describe how certain entities should look,
check out the [scene component](/components/scene.html). 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)
```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
```
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.</br>
![Sample](http://i.imgur.com/2s1ukCb.png)