Time pattern
The Time pattern trigger is useful when you want an automation to run on a repeating schedule. Use it when a fixed time is not enough, like every 5 minutes, at the top of every hour, or every day at 15 minutes past the hour.
Using this trigger from the user interface
If you prefer building automations visually, Home Assistant walks you through this trigger step by step. You pick what to watch, tweak a few options, and save. No YAML knowledge required.
To use this trigger in an automation:
- Go to Settings > Automations & scenes.
- Open an existing automation, or select Create automation > Create new automation.
- In the When section, select Add trigger.
- Select the type of trigger to add.
- Select Time pattern.
- Enter values for Hours, Minutes, or Seconds.
- Select Save.
Options in the UI
Using this trigger in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, use trigger: time_pattern. A basic example looks like this:
trigger: time_pattern
minutes: "/5"
This runs every 5 minutes.
Options in YAML
Good to know
- Use
*to match any value. - Use
/nto match values divisible byn, like/5for every 5 minutes. - If you set
hourswithoutminutes, Home Assistant uses minute0. If you setminuteswithoutseconds, Home Assistant uses second0. - Do not add leading zeroes to these values. For example, use
1, not01.
Try it yourself
Ready to test this? Go to Settings > Automations & scenes, create a new automation, and add this trigger. Save the automation, then change the state of the targeted entity to watch the trigger fire on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more].
For this trigger, there is no target entity to change. To test it, set minutes: "/1" so the automation runs every minute.
More examples
Real scenarios where this trigger fires in automations and scripts. Copy any example and adapt it to your setup.
You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.
Automation: refresh an entity every 15 minutes
If you want a regular refresh, this automation updates an entity every 15 minutes.
-
Trigger: Time pattern
-
Minutes:
/15
-
Minutes:
- Action: Update entity
YAML example for a 15-minute entity refresh
alias: "Refresh the weather entity every 15 minutes"
triggers:
- trigger: time_pattern
minutes: "/15"
actions:
- action: homeassistant.update_entity
target:
entity_id: weather.home
Automation: send a reminder at 15 minutes past every hour
If you want a repeating reminder during the day, this automation sends a message at 15 minutes past every hour.
-
Trigger: Time pattern
-
Minutes:
15
-
Minutes:
-
Action: Send a notification message
-
Target: My Device (
notify.my_device)
-
Target: My Device (
YAML example for an hourly reminder
alias: "Send an hourly reminder at 15 minutes past"
triggers:
- trigger: time_pattern
minutes: 15
actions:
- action: notify.send_message
target:
entity_id: notify.my_device
data:
message: "This is your hourly reminder."
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the trigger you’re using and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain triggers or suggest the right one when you describe what you want in plain language.
Related triggers
These triggers work well alongside this one:
-
Time: Triggers at a specific time, or from a date/time helper or timestamp-style sensor.
-
Home Assistant: Triggers when Home Assistant starts up or shuts down.