mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
Add offset instructions to automation trigger (#26963)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
8f1cf94b9f
commit
28b13f9408
@ -51,23 +51,25 @@ sun:
|
|||||||
<img src='/images/screenshots/more-info-dialog-sun.png' />
|
<img src='/images/screenshots/more-info-dialog-sun.png' />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Implementation Details
|
## Automation trigger
|
||||||
|
|
||||||
The sun's event listener will call the service when the sun rises or sets with
|
The sun's event listener will call the service when the sun rises or sets with
|
||||||
an offset.
|
an offset.
|
||||||
|
|
||||||
The sun event need to have the type 'sun', which service to call,
|
The sun trigger need to have the type 'sun', which event (sunset or sunrise) and an optional offset.
|
||||||
which event (sunset or sunrise) and the offset.
|
|
||||||
|
|
||||||
```json
|
```yaml
|
||||||
{
|
trigger:
|
||||||
"type": "sun",
|
- platform: sun
|
||||||
"service": "switch.turn_on",
|
event: sunrise
|
||||||
"event": "sunset",
|
offset: "-01:00:01"
|
||||||
"offset": "-01:00:00"
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
| Key name | Description |
|
||||||
|
| --------- | ----------- |
|
||||||
|
| `event` | Possible values: `sunset` or `sunrise`
|
||||||
|
| `offset` | An optional offset for the sun event trigger, in a positive or negative number of seconds, or specified in `HH:MM:SS` (after sun event trigger) or `-HH:MM:SS` (before sun event trigger).
|
||||||
|
|
||||||
### Maintains entity `sun.sun`
|
### Maintains entity `sun.sun`
|
||||||
|
|
||||||
| Possible state | Description |
|
| Possible state | Description |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user