Skip to content

Instantly share code, notes, and snippets.

@qJake
Last active September 25, 2025 02:22
Show Gist options
  • Select an option

  • Save qJake/08fce89976125de1977370ea077b73e7 to your computer and use it in GitHub Desktop.

Select an option

Save qJake/08fce89976125de1977370ea077b73e7 to your computer and use it in GitHub Desktop.
Home Assistant Blueprint - Script - Do After Delay
blueprint:
name: Do After Delay
description: Perform one or more actions after a specified delay, in minutes.
domain: script
homeassistant:
min_version: '2025.7.0'
author: 'qJake - https://community.home-assistant.io/u/qjake'
mode: parallel
max: 50
fields:
delay_mins:
name: Delay (mins)
description: How long to delay the action(s) for. Max is 1440 minutes.
required: true
default: 5
selector:
number:
min: 0
max: 1440
step: 5
action:
name: Actions
description: The action(s) to perform.
required: true
selector:
action:
sequence:
- delay:
hours: 0
minutes: "{{ delay_mins }}"
seconds: 0
milliseconds: 0
- repeat:
for_each: "{{ action }}"
sequence:
- choose:
- conditions:
- condition: template
value_template: >-
{{ repeat.item.target is defined and repeat.item.data is
defined }}
sequence:
- target: "{{ repeat.item.target }}"
data: "{{ repeat.item.data }}"
action: "{{ repeat.item.action }}"
- conditions:
- condition: template
value_template: "{{ repeat.item.target is defined }}"
sequence:
- target: "{{ repeat.item.target }}"
action: "{{ repeat.item.action }}"
- conditions:
- condition: template
value_template: "{{ repeat.item.data is defined }}"
sequence:
- data: "{{ repeat.item.data }}"
action: "{{ repeat.item.action }}"
default:
- action: "{{ repeat.item.action }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment