I have an automation that is created from a blueprint. I want to be able to change the variables of the created automation by running a script but I can’t seem to find how to reference the variables in a home assistant script. Here is my blueprint:
blueprint:
name: Sprinkler Automation v2025.05.23.02
description: Another attempt at sprinkler automation
domain: automation
input:
switch:
name: Sprinkler Switch
description: The boolean of the sprinkler switch to toggle ON or OFF
selector:
entity:
domain: switch
start_time_1:
name: Start Time - First Pass
description: Time of Day to turn ON the sprinkler
selector:
time:
stop_time_1:
name: Stop Time - First Pass
description: Time of Day to turn OFF the sprinkler
selector:
time:
start_time_2:
name: Start Time - Second Pass
description: Time of Day to turn ON the sprinkler
selector:
time:
stop_time_2:
name: Stop Time - Second Pass
description: Time of Day to turn OFF the sprinkler
selector:
time:
variables:
start_time_1: !input start_time_1
stop_time_1: !input stop_time_1
start_time_2: !input start_time_2
stop_time_2: !input stop_time_2
mode: single
triggers:
- trigger: time
at:
- !input start_time_1
- !input stop_time_1
- !input start_time_2
- !input stop_time_2
- trigger: homeassistant
event: start
conditions: []
actions:
- choose:
- conditions:
- condition: time
after: !input start_time_1
before: !input stop_time_1
- condition: time
after: !input start_time_2
before: !input stop_time_2
sequence:
- data: {}
target:
entity_id:
- !input switch
action: switch.turn_on
default:
- data: {}
target:
entity_id:
- !input switch
action: switch.turn_off