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' />
|
||||
</p>
|
||||
|
||||
## Implementation Details
|
||||
## Automation trigger
|
||||
|
||||
The sun's event listener will call the service when the sun rises or sets with
|
||||
an offset.
|
||||
|
||||
The sun event need to have the type 'sun', which service to call,
|
||||
which event (sunset or sunrise) and the offset.
|
||||
The sun trigger need to have the type 'sun', which event (sunset or sunrise) and an optional offset.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "sun",
|
||||
"service": "switch.turn_on",
|
||||
"event": "sunset",
|
||||
"offset": "-01:00:00"
|
||||
}
|
||||
```yaml
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunrise
|
||||
offset: "-01:00:01"
|
||||
```
|
||||
|
||||
| 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`
|
||||
|
||||
| Possible state | Description |
|
||||
|
Loading…
x
Reference in New Issue
Block a user