diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index 43298851180..48517d9ccda 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -165,33 +165,40 @@ Rendering templates with time (`now()`) is dangerous as trigger templates only u ### {% linkable_title Time trigger %} -Time can be triggered in many ways. The most common is to specify `at` and trigger at a specific point in time each day. Alternatively, you can also match if the hour, minute or second of the current time has a specific value. You can prefix the value with a `/` to match whenever the value is divisible by that number. You cannot use `at` together with hour, minute or second. +The time trigger is configured to run once at a specific point in time each day. ```yaml automation: trigger: platform: time + # Military time format. This trigger will fire at 3:32 PM + at: '15:32:00' +``` + +### {% linkable_title Time pattern trigger %} + +With the time pattern trigger, you can match if the hour, minute or second of the current time matches a specific value. You can prefix the value with a `/` to match whenever the value is divisible by that number. You can specify `*` to match any value. + +```yaml +automation: + trigger: + platform: time_pattern # Matches every hour at 5 minutes past whole minutes: 5 - seconds: 00 automation 2: trigger: - platform: time - # When 'at' is used, you cannot also match on hour, minute, seconds. - # Military time format. - at: '15:32:00' + platform: time_pattern + # Trigger once per minute during the hour of 3 + hours: '3' + minutes: '*' automation 3: trigger: - platform: time + platform: time_pattern # You can also match on interval. This will match every 5 minutes minutes: '/5' - seconds: 00 ``` -
- Remember that if you are using matching to include both `minutes` and `seconds`. Without `seconds`, your automation will trigger 60 times during the matching minute. -
### {% linkable_title Webhook trigger %}