Skip to main content
Tutorials

Home Assistant Automation Blueprints: Create and Share Automations

Learn to create Automation Blueprints in Home Assistant for reuse and sharing with the community

SmileX

SmileX

Founder & CEO

1 min read
Home Assistant Automation Blueprints: Create and Share Automations

What Are Automation Blueprints?

Blueprints are reusable templates for automations that define customizable variables.

Creating a Basic Blueprint

Blueprint YAML Structure

blueprint:
name: Motion-Activated Light
description: Turn on a light when motion is detected.
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
device_class: motion
light_target:
name: Light
selector:
target:
entity:
domain: light
no_motion_wait:
name: Wait time
default: 120
selector:
number:
min: 0
max: 3600
unit_of_measurement: seconds
trigger:
platform: state
entity_id: !input motion_entity
from: "off"
to: "on"
action:
- service: light.turn_on
target: !input light_target
- wait_for_trigger:
platform: state
entity_id: !input motion_entity
from: "on"
to: "off"
- delay: !input no_motion_wait
- service: light.turn_off
target: !input light_target

Using a Blueprint

1. Import a Blueprint from the Community

# In your automation
automation:
- use_blueprint:
path: my_blueprints/motion_light.yaml
input:
motion_entity: binary_sensor.living_room_motion
light_target:
entity_id: light.living_room
no_motion_wait: 300

2. Import from GitHub

automation:
- use_blueprint:
url: https://github.com/home-assistant/core/blob/master/homeassistant/components/automation/blueprints/motion_light.yaml
input:
motion_entity: binary_sensor.hall_motion
light_target:
entity_id: light.hall

Advanced Blueprint Example

Presence-Based Climate Control

blueprint:
name: Presence-Based Climate
description: Adjust climate based on presence and time of day.
domain: automation
input:
presence_entity:
name: Presence Sensor
selector:
entity:
domain: binary_sensor
device_class: presence
climate_entity:
name: Climate Control
selector:
entity:
domain: climate
home_temp:
name: Home Temperature
default: 24
selector:
number:
min: 16
max: 30
unit_of_measurement: °C
away_temp:
name: Away Temperature
default: 28
selector:
number:
min: 16
max: 30
unit_of_measurement: °C
trigger:
- platform: state
entity_id: !input presence_entity
action:
- service: climate.set_temperature
target:
entity_id: !input climate_entity
data:
temperature: >
{% if trigger.to_state.state == 'on' %}
{{ !input home_temp }}
{% else %}
{{ !input away_temp }}
{% endif %}

Conclusion

Automation Blueprints make it possible to build flexible, reusable automations, making smart home management more efficient.

Share:
SmileX

About the Author

SmileX

Founder & CEO

Founder of RACKSYNC with 14+ years of experience in IoT, Cloud Infrastructure, and Smart Home solutions.