An automation blueprint is a reusable automation template in Home Assistant that defines the triggers, conditions and actions of a routine once and exposes only the variable parts, such as which motion sensor or which lamp to use, as configurable inputs. In home automation, a blueprint separates the logic of a rule from the devices it controls, so one tested design can power many independent automations across a smart home.
The term is also used as Home Assistant blueprint, because the platform introduced the concept in release 2020.12 and remains its main reference implementation. Other hubs offer similar ideas under different names, but the blueprint model, with its YAML file, typed inputs and shareable URL, is the form most practitioners mean when they use the word.
How an automation blueprint is structured
An automation blueprint is a single YAML file with two parts: a blueprint: metadata block and the automation body. The metadata names the blueprint, describes it, declares domain: automation and lists every input with its selector. The body is an ordinary automation in which each variable value is replaced by an `!input` tag that points to one declared input.
When a user creates an automation from the blueprint, the editor shows a generated form instead of the raw logic. The resulting automation stores only a use_blueprint: reference with the file path and the chosen input values. Home Assistant merges the template and the values at load time, which means the automation itself contains no copy of the logic.
The table below lists the main elements of a blueprint file and what each one controls.
| Element | Purpose | Typical content |
|---|---|---|
| Metadata block | Identifies the blueprint | Name, description, domain, author |
| Input definitions | Declares configurable values | Name, description, selector, default |
| Selectors | Shape the form field and validation | Entity, device, area, number, time |
| `!input` tags | Insert user values into the logic | Trigger entity, delay, target lights |
| Source URL | Allows re-import of updates | Link to the published file |
| Minimum version | Blocks use on older releases | A Home Assistant version string |
Inputs and selectors in a blueprint
Selectors define what a user may enter for each input, and they are the main tool for making a blueprint safe to share. An entity selector can be limited to a domain and a device class, for example only binary sensors of class motion, which prevents a user from choosing a door lock where a motion sensor is expected. Strict selectors reduce configuration errors far more effectively than long descriptions.
The following table compares the selectors that appear most often in published blueprints.
| Selector | Value it returns | Typical use |
|---|---|---|
| Entity | One or more entity IDs | Choosing a sensor or switch |
| Target | Entities, devices or areas | Lights to switch in a room |
| Device | A device ID | Remote or button event triggers |
| Number | A value within a range | Delay in seconds or brightness |
| Time | A clock time | Start of a quiet period |
| Boolean | True or false | Optional feature switch |
Inputs can carry default values, which make a blueprint usable with minimal setup, and recent releases allow collapsible input sections that group advanced options. A frequent design limit is that !input values are not available in every place as template variables; authors expose them through a variables: block when templates need them.
Blueprints compared with related automation concepts
A blueprint is a pattern for creating automations, not an automation in its own right, and this distinction separates it from neighboring concepts in home automation. An automation rule runs on its own, a scene stores device states, and a routine in consumer ecosystems is usually a fixed sequence built in an app.
The table below places the automation blueprint next to these related concepts.
| Concept | What it stores | Reusable across devices | Runs by itself |
|---|---|---|---|
| Automation blueprint | Logic with input placeholders | Yes, by design | No |
| Automation rule | Logic with fixed devices | No, must be copied | Yes |
| Smart home scene | Target states of devices | No | Only when activated |
| Script blueprint | Action sequence with inputs | Yes | Only when called |
| Routine | App-defined sequence | Rarely | Yes |
Home Assistant also supports script blueprints and template blueprints, which apply the same input mechanism to scripts and template entities. The core idea stays identical: write the logic once, configure it many times.
Importing, updating and maintaining blueprints
Blueprints are usually imported from a URL, such as a community forum post or a code repository, through the import dialog in the automation settings. Home Assistant stores the file under the blueprints folder in the configuration directory, and the stored source URL allows a later re-import that replaces the file with the newest version.
Because every derived automation references the same file, one change to the blueprint updates all automations after a reload. This is the main maintenance benefit and also the main risk: a faulty edit or an incompatible upstream update can break every dependent automation at once.
The decision table below summarizes how practitioners usually handle blueprint maintenance.
| Situation | Recommended choice | Reason |
|---|---|---|
| Logic used in many rooms | Create or use a blueprint | One fix applies everywhere |
| One unique automation | Write a normal automation | A template adds no value |
| Upstream update available | Review changes before re-import | New inputs may be required |
| Need to change one instance only | Take control of that automation | Detaches it from the template |
| Shared with other users | Set strict selectors and defaults | Prevents invalid configurations |
Limitations and common mistakes
Blueprints trade flexibility for consistency. Every instance shares the same trigger and action structure, so a user cannot add one extra condition to a single instance without editing the blueprint or detaching the automation from it.
- Importing untrusted blueprints without reading the YAML, which may call services the user did not expect.
- Editing a shared blueprint in place for one room, which silently changes all other rooms.
- Loose selectors that accept any entity and produce errors only at run time.
- Ignoring the automation mode, so overlapping triggers restart or drop runs unexpectedly.
- Re-importing over local edits, which overwrites custom changes without a merge.
In simple terms
An automation blueprint is like a fill-in-the-blanks form for a smart home rule. Someone writes the rule once. For example: when motion is seen, turn on a light, then turn it off later. The blueprint leaves blanks for the sensor, the light and the waiting time.
You fill in the blanks for each room. The hallway gets its sensor and lamp. The bathroom gets different ones. Each filled form becomes its own automation, but all of them follow the same tested logic. If the original rule is improved, every room gets the improvement.
A practical example
A family in a two-story house runs Home Assistant with eleven motion sensors and smart bulbs in most rooms. At first, the owner writes a separate motion-lighting automation for each room, and small differences creep in: some rooms ignore daylight, others never switch off when a door is left open.
The owner replaces them with one motion-light blueprint that has inputs for the motion sensor, the target lights, an illuminance sensor with a threshold of 40 lux, a no-motion delay with a default of 120 seconds and an optional night brightness. Creating each room automation now takes about a minute, and the strict selectors stop anyone from picking the wrong device type.
Months later, the owner adds a check that skips the lights during a movie scene. One edit to the blueprint updates all eleven rooms after a reload, and the household gets consistent lighting behavior without touching each automation separately.