First automation
Start from the beginning with your first automation.
Home Assistant 2026.7 changes the starting point for new automations. Instead of first choosing between technical trigger types such as state and numeric state, you can begin with the event you care about: a door opens, the temperature drops, a battery runs low, or motion is detected in an area.
This guide uses an outdoor motion light as a practical example. Your existing automations are not converted or disabled by the update.
| Before | New starting point |
|---|---|
| Choose a technical trigger type | Choose an event such as “motion detected” |
| Often point to one entity | Select an area where the integration supports it |
Know about on, off, and attributes | Let the integration describe the useful event |
| Find the documentation separately | Open trigger, condition, or action documentation from the editor |
The integration behind a device can provide its own readable triggers and conditions. The available choices therefore depend on your integrations and device types. The generic editor and YAML remain available.
Spend five minutes on the setup before building:
Areas work well when the intent concerns the room rather than one particular sensor. If you replace that sensor later, an area-based automation can be easier to maintain.
The goal is:
When motion is detected outside after sunset, turn on the outdoor lights. Turn them off after the area has been quiet for five minutes.
Create the automation
Go to Settings → Automations & scenes → Create automation → Create new automation.
Choose the event
Under When, search for motion and select the purpose-specific motion
detected trigger. Choose the Outside area if the editor offers area
targeting. Otherwise select the stable motion sensor entity.
Limit it to darkness
Under And if, add the built-in sun condition for after sunset. Prefer this to a hand-written time template.
Turn on the lights
Under Then do, choose the turn-on action and target the Outside area
or the specific lights you want.
Wait for quiet
Add a wait action for the motion sensor to become inactive. Follow it with a five-minute delay, then turn the lights off.
Choose restart mode
Set the automation mode to Restart. New motion should restart the timeout instead of being ignored.
Save with a useful name
A name such as Outdoor lights – motion after dark will be easier to find
and debug later.
Check each boundary separately:
A successful manual action does not prove the trigger works. A trace from a complete natural run is the stronger check.
No. Home Assistant states that existing automations, generic triggers, templates, and YAML continue to work. Use the new editor for new automations first. Change an existing automation only when doing so fixes a real problem or makes it meaningfully easier to maintain.
Before changing an important automation:
Select temperature threshold, time, sun, zone, or state directly. Templates remain useful for special calculations, but are harder to validate and debug.
Prefer an area or entity_id for ordinary devices. Internal device_id values
can change when a device is removed and added again.
| Situation | Mode |
|---|---|
| Motion light with a timeout | Restart |
| Locks or doors processed in order | Queued |
| Independent events that may overlap | Parallel |
| One short notification | Single |
Update Home Assistant and the relevant integration. Not every integration provides purpose-specific triggers yet. Use a normal state or numeric threshold trigger when it accurately represents the event.
Review area assignments and which domains the action targets. Select individual entities if only particular lights should respond.
Confirm the automation uses Restart and that the new motion actually starts a fresh run. Read the trace before extending the delay.
Open the latest trace. Check the condition result and the first failed action. Fix the documented failure instead of adding more delays.
First automation
Start from the beginning with your first automation.
More ideas
Browse practical patterns in the automations overview.
SmartBolig // AI Core
Get help with troubleshooting, architecture and concrete configuration. I use broad AI knowledge and find SmartBolig guides when they improve the answer.
Start with a useful question