i use an automation to fire off a script. script turns on lights in sequence with delay. i wanna be able to have input_boolean switches made with ui helper, so that if i randomly decide ‘hey i dont want this light on for the next few days’ i dont have to change the on/off script via notepad. i understand in scripts they dont move forward if a standard conditional statement is in the sequence. is there a better way to do this? I know a lot of changes to the templating and scripting jinja has been applied over the last year and any google searches gives me outdated info, to my belief atleast. Any suggestions are welcome, but if im not mistaken i basically have to turn these into automations if i want the condition based off the inputboolean
current lights on automation:
automation:
- id: 'veg_lights_on'
alias: 'veglights_on'
description: turn veg lights on at the right time
trigger:
- platform: time
at: input_datetime.veg_lights_on
condition: []
action:
- service: script.veg_lights_cycle_on
data: {}
mode: single
and in so, if the switch was set to true, the delay would still take place between each switch being turned on, and so forth.
i feel like i could have figured this out with the time taken to explain it, but after days of letting this linger in my head, i give up and am reaching out.
Invalid config for [script]: [choose] is an invalid option for [script]. Check: script->choose. (See /config/configuration.yaml, line 37).
Invalid config for [script]: [service] is an invalid option for [script]. Check: script->sequence->0->choose->1->service. (See /config/configuration.yaml, line 37).
If you are composing the script in the scripts.yaml file then you don’t include script: on the first line.
im not, i actually just included it for any “true” new person that may misread or misunderstand somewhere. I for sure remember the nightmares of some of this. And when tom_i responded with choose commands from an automation, and not a script, I was a little in fear, but due to moderator status, chose to just continue to add in to emphasize, however I appreciate the tip. This was something I struggled with when breaking out of configuration.yaml into seperate files and not knowing why of all the errors. that was like week 2 issues. im on like year 2-3.