mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 13:56:53 +00:00
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:
parent
c63bc857da
commit
e944dd468d
@ -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.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.description` | A detailed description of the calendar event, if available. |
|
||||||
| `trigger.calendar_event.location` | Location information for 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
|
### Device
|
||||||
|
|
||||||
| Template variable | Data |
|
| Template variable | Data |
|
||||||
|
@ -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
|
much more flexible automations that using the Calendar entity state which only supports a single
|
||||||
event start at a time.
|
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
|
```yaml
|
||||||
automation:
|
automation:
|
||||||
trigger:
|
trigger:
|
||||||
@ -866,6 +868,8 @@ automation:
|
|||||||
event: start
|
event: start
|
||||||
# The calendar entity_id
|
# The calendar entity_id
|
||||||
entity_id: calendar.light_schedule
|
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
|
See the [Calendar](/integrations/calendar/) integration for more details on event triggers and the
|
||||||
|
@ -32,6 +32,8 @@ automation:
|
|||||||
event: start
|
event: start
|
||||||
# The calendar entity_id
|
# The calendar entity_id
|
||||||
entity_id: calendar.personal
|
entity_id: calendar.personal
|
||||||
|
# Optional time offset to fire a set time before or after event start/end
|
||||||
|
offset: -00:15:00
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example Automation
|
### Example Automation
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 51 KiB |
Loading…
x
Reference in New Issue
Block a user