Hi,
I’ve been playing around with HA for a month or two. I’ve started to create a couple of automations but want to expand a bit into scripts - this is where things get vague.
1 - Theres a YouTube video Creating a Script In Home Assistant which implies there is an editor that creates scripts like automations. However I cannot find it anywhere? The video was version 0.52 and I’m on on 0.103 so has this option been removed? Why… do automations take over from it? I was under the impression you used scripts for things like “Turn everything off” - to turn all my switches off in HA through 1 click, not having to click each individual switch to turn them off. If this is the case and the script editor has been removed, do I just create an automation without a trigger?
2 - I’ve tried to create a script file. I added the following line to my configuration.yaml
script: !include scripts.yaml
I then tried to put what I thought was a very simple script inside the file:
script:
turn_everything_off:
alias: Turn Everything Off
description: 'Turns off all switches'
sequence:
- alias: Porch Switch Off
service: switch.turn_off
data:
entity_id: switch.porch_switch
- alias: Christmas Tree Off
service: switch.turn_off
data:
entity_id: switch.christmas_tree
However I just receive an error when I run “Check Config” - I’ve used a yaml validator and the code appears to be clean. The error is as follows
Invalid config for [script]: [turn_everything_off] is an invalid option for [script]. Check: script->script->script->turn_everything_off. (See /config/configuration.yaml, line 130). Please check the docs at https://home-assistant.io/integrations/script/
Can someone please point me in the right direction?