-
Notifications
You must be signed in to change notification settings - Fork 0
Scan Automations
Scott Gusler edited this page Feb 13, 2026
·
1 revision
The Scan Automations service helps you discover which of your Home Assistant automations use time or date-based triggers and conditions. This is useful for:
- Understanding which automations might benefit from Clockwork calculations
- Identifying automations that rely on time-based logic
- Planning migration of existing automation logic to Clockwork entities
- Go to Settings > Devices & Services
- Find Clockwork in the integrations list
- Click Configure
- Select Scan Automations for Time Patterns
- The scan results will display immediately, showing:
- Number of automations detected
- Automation names
- Detected time/date patterns (e.g., time triggers, conditions)
You can also call the service directly from Developer Tools:
- Go to Developer Tools > Services
- Search for and select
clockwork.scan_automations - Click Call Service
- Results will appear in the notification area showing JSON with all detected automations
The scanner looks for:
- at: triggers - Time-specific triggers
- platform: time triggers - Recurring time triggers
- Time conditions - before, after, weekday conditions
- time() functions - now() and utcnow() function usage
- Time fields - Hour, minute, second conditions or triggers
- Date functions - Functions that manipulate dates/times
When you run the scan, you might see results like:
Found 3 automations with time/date patterns:
• **Evening Lights**: at, platform: time
• **Workday Check**: before, after
• **Sunset Trigger**: platform: sun
Once you identify automations with time/date patterns, you can:
- Create corresponding Clockwork calculations for the same logic
- Replace the time/date conditions with Clockwork sensors
- Simplify your automation conditions by using the calculated entities
Once you identify an automation that monitors your garage door, you can use a Clockwork Offset Calculation to handle delayed triggering:
Traditional Approach:
---
automation:
- alias: "Garage Door Alert"
trigger:
platform: state
entity_id: binary_sensor.garage_door
to: "on"
action:
- delay: "00:30:00" # Wait 30 minutes
- condition: state
entity_id: binary_sensor.garage_door
state: "on" # Still open?
- service: notify.send_alert
data:
message: "Garage door has been open for 30 minutes"With Clockwork:
-
Create an Offset Calculation:
- Name: "Garage Door Open 30min"
- Entity:
binary_sensor.garage_door - Time Offset: "30 minutes"
- Behavior Mode: "pulse" (or "duration" to keep alert active)
- Trigger Event: "on"
-
Simplify your automation:
automation:
- alias: "Garage Door Alert"
trigger:
platform: state
entity_id: binary_sensor.garage_door_open_30min
to: "on"
action:
service: notify.send_alert
data:
message: "Garage door has been open for 30 minutes"Key Benefits:
- The offset calculation survives Home Assistant restarts - the 30-minute timer continues accurately even after a restart
- Your automation trigger is simple: just when the binary sensor activates after the offset time has elapsed
- Clockwork handles all the timing logic automatically with "latch", "pulse", or "duration" modes
- No delays or extra conditions cluttering your automation logic
- Easy to adjust the delay time without modifying automation logic
clockwork.scan_automations
The service returns JSON with the following structure:
{
"automations": [
{
"id": "automation_id_123",
"alias": "Automation Name",
"patterns": ["pattern1", "pattern2"]
}
]
}- Config Flow: Results display in the UI form
- Service Call: Results logged to Settings > Logs
- Actions Page: Results shown in the notification panel