From 4148f723ac8fe83a6a1ea5b1760ddd83eb345d08 Mon Sep 17 00:00:00 2001
From: Paulus Schoutsen
Date: Mon, 5 Oct 2015 21:45:53 -0700
Subject: [PATCH] Tweak sun docs
---
source/components/automation.markdown | 7 ++++---
source/components/sun.markdown | 13 +++++++------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/source/components/automation.markdown b/source/components/automation.markdown
index b6e1a30b893..41da0eb8840 100644
--- a/source/components/automation.markdown
+++ b/source/components/automation.markdown
@@ -144,7 +144,8 @@ automation:
#### {% linkable_title Sun trigger %}
-Triggers based on sunrise and sunset, both with an optional offset to simulate Dawn/Dusk scenarios.
+Trigger when the sun is setting or rising. An optional time offset can be given to have it trigger for
+example 45 minutes before sunset, when dusk is setting in.
```yaml
automation:
@@ -152,8 +153,8 @@ automation:
platform: sun
# Possible values: sunset, sunrise
event: sunset
- # Optional time offset for Dusk scenario
- offset: -00:45:00
+ # Optional time offset. This example is 45 minutes.
+ offset: '-00:45:00'
```
#### {% linkable_title Time trigger %}
diff --git a/source/components/sun.markdown b/source/components/sun.markdown
index f793ea113bc..ee46abe499e 100644
--- a/source/components/sun.markdown
+++ b/source/components/sun.markdown
@@ -9,23 +9,24 @@ sharing: true
footer: true
---
-The `sun` component will use your current location to track if the sun is above or below the horizon. This is a common ingredient within Home Automation.
+The `sun` component will use your current location to track if the sun is above or below the horizon.
+The sun can be used within automation as [a trigger with an optional offset to simulate dawn/dusk][automation-trigger].
-To set it up, add the following lines to your `configuration.yaml`:
+[automation-trigger]: /components/automation.html#sun-trigger
-```
+```yaml
+# Example configuration.yaml entry
homeassistant:
latitude: 32.87336
longitude: -117.22743
sun:
+ # Optional. If ommitted will be retrieved from Google Maps
elevation: 123
```
-`elevation` is optional. If not given, it will be queried from Google Maps using the specified location.
-
-
+
### Implementation Details