Add documentation for calendar trigger offset (#22554)

* Add documentation for calendar offset triggers

* Add documentation for offset trigger in template
This commit is contained in:
Allen Porter 2022-05-12 07:44:22 -07:00 committed by GitHub
parent c63bc857da
commit e944dd468d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 0 deletions

View File

@ -37,6 +37,8 @@ The following describes trigger data associated with all platforms.
| `trigger.calendar_event.all_day` | Indicates the event spans the entire day. |
| `trigger.calendar_event.description` | A detailed description of the calendar event, if available. |
| `trigger.calendar_event.location` | Location information for the calendar event, if available. |
| `trigger.offset` | Timedelta object with offset to the event, if any |
### Device
| Template variable | Data |

View File

@ -858,6 +858,8 @@ Calendar trigger fires when a [Calendar](/integrations/calendar/) event starts o
much more flexible automations that using the Calendar entity state which only supports a single
event start at a time.
An optional time offset can be given to have it fire a set time before or after the calendar event (e.g., 5 minutes before event start).
```yaml
automation:
trigger:
@ -866,6 +868,8 @@ automation:
event: start
# The calendar entity_id
entity_id: calendar.light_schedule
# Optional time offset
offset: "-00:05:00"
```
See the [Calendar](/integrations/calendar/) integration for more details on event triggers and the

View File

@ -32,6 +32,8 @@ automation:
event: start
# The calendar entity_id
entity_id: calendar.personal
# Optional time offset to fire a set time before or after event start/end
offset: -00:15:00
```
### Example Automation

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 51 KiB