diff --git a/source/_integrations/sun.markdown b/source/_integrations/sun.markdown index 1029f8e1d83..874f3e622eb 100644 --- a/source/_integrations/sun.markdown +++ b/source/_integrations/sun.markdown @@ -51,23 +51,25 @@ sun:

-## 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 |