diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index ebee59a7a14..c59d0395e8e 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -651,6 +651,31 @@ automation: - "18:30:00" ``` +### Specifying an offset + +When the time is provided using an Input Datetime or a sensor of the timestamp device class an offset can be provided. This offset will be added to (or subtracted from, when negative) the Input Datetime or sensor value. + +For example, this trigger fires 5 minutes before the phone alarm goes off. + +```yaml +automation: + - trigger: + - platform: time + at: + entity_id: sensor.phone_next_alarm + offset: -00:05:00 + action: + - service: light.turn_on + target: + entity_id: light.bedroom +``` + +