If you’re interested in using an Automation Blueprint, here are two examples:
One-Time Scheduled Action
The first one looks like this:
It allows you choose an action
(or more than one action
) and the time when it should be performed. The resulting automation will trigger at the scheduled time, perform the action(s) you specified, then disable itself.
BLUEPRINT: One-Time Scheduled Action
blueprint:
name: One-Time Scheduled Action
description: Perform an action at a scheduled time.
domain: automation
input:
what:
name: Action to do
description: What kind of action?
selector:
action:
when:
name: When to do it
description: When should the action occur?
selector:
time:
trigger:
- platform: time
at: !input when
condition: []
action:
- choose:
- conditions: '{{ true }}'
sequence: !input what
- service: automation.turn_off
target:
entity_id: '{{ this.entity_id }}'
One-Time Scheduled Toggle
The second one looks like this:
It’s designed to simply turn on/off an entity at a chosen time. You specify the command (on or off), the entity, and the time. The resulting automation will trigger at the scheduled time, turn on (or off) the specified entity, then disable itself.
BLUEPRINT: One-Time Scheduled Toggle
blueprint:
name: One-Time Scheduled Toggle
description: Turn something on or off at a scheduled time.
domain: automation
input:
what:
name: Action to do
description: On or off?
selector:
boolean:
which:
name: Entity to control
description: Which entity?
selector:
target:
entity:
domain:
- light
- switch
- input_boolean
- climate
when:
name: When to do it
description: When should the action occur?
selector:
time:
variables:
command: !input what
trigger:
- platform: time
at: !input when
condition: []
action:
- service: "homeassistant.turn_{{ iif(command, 'on', 'off') }}"
target: !input which
- service: automation.turn_off
target:
entity_id: '{{ this.entity_id }}'
The second example is faster to use if all you want to do is turn on/off an entity. If you examine the blueprint, you’ll see it limits the selection of entities to light
, switch
, input_boolean
, and climate
. Feel free to add other entity domains that can be turned on/off.
NOTE
As mentioned, the blueprint generates an automation that disables itself after it has executed. For example, it turns on a switch at 11:00 today and never again, because it disables itself. Should you ever want the automation to run again on another day, just re-enable it (before its scheduled time).