mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-17 06:16:50 +00:00
Tweak sun docs
This commit is contained in:
parent
6fbf16fda1
commit
4148f723ac
@ -144,7 +144,8 @@ automation:
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
#### {% linkable_title Sun trigger %}
|
#### {% 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
|
```yaml
|
||||||
automation:
|
automation:
|
||||||
@ -152,8 +153,8 @@ automation:
|
|||||||
platform: sun
|
platform: sun
|
||||||
# Possible values: sunset, sunrise
|
# Possible values: sunset, sunrise
|
||||||
event: sunset
|
event: sunset
|
||||||
# Optional time offset for Dusk scenario
|
# Optional time offset. This example is 45 minutes.
|
||||||
offset: -00:45:00
|
offset: '-00:45:00'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### {% linkable_title Time trigger %}
|
#### {% linkable_title Time trigger %}
|
||||||
|
@ -9,23 +9,24 @@ sharing: true
|
|||||||
footer: 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:
|
homeassistant:
|
||||||
latitude: 32.87336
|
latitude: 32.87336
|
||||||
longitude: -117.22743
|
longitude: -117.22743
|
||||||
|
|
||||||
sun:
|
sun:
|
||||||
|
# Optional. If ommitted will be retrieved from Google Maps
|
||||||
elevation: 123
|
elevation: 123
|
||||||
```
|
```
|
||||||
|
|
||||||
`elevation` is optional. If not given, it will be queried from Google Maps using the specified location.
|
|
||||||
|
|
||||||
<p class='img'>
|
<p class='img'>
|
||||||
<img src='{{site_root}}/images/screenshots/more-info-dialog-sun.png' />
|
<img src='/images/screenshots/more-info-dialog-sun.png' />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
### Implementation Details
|
### Implementation Details
|
||||||
|
Loading…
x
Reference in New Issue
Block a user