Scripts Won't Load

Hi,

I am having a weird issue where no scripts will load from script.yaml or script folder, was working fine yesterday. The only change was upgrading to .68. He is one script (the only one I have in the script.yaml file) which I copied from syntax example:

test_script:
  sequence:
    # This is written using the Script Syntax
    - service: light.turn_on
      data:
        entity_id: group.lights_dimmer

And in my config yaml:

script: !include script.yaml

If I create in UI (when there is a scripts.yaml file) it works fine.

I have treid everything I can think of at this point, including recreating python venv.

Thanks,
Cody

1 Like

So this just popped up in the log;

2018-04-29 11:08:48 WARNING (MainThread) [homeassistant.components.group] remove:Group ‘all_scripts’ doesn’t exist!

What does that mean? I was able to get scripts to show from script.yaml, but when I move to folder and use

script: !include_dir_merge_list script

That error occurs

Scripts aren’t specified in lists, they are named. Thus you need !include_dir_merge_named

I have always been confused about the correct include to use, is it documented somewhere?

Yup that was it, thank you (yet again) for your help

Yeah, basically exactly where you linked to. The problem tends to be that people don’t notice the difference between a listed multiple entry and a named multiple entry, so they don’t understand what the options mean and therefore which one they need.

Yeah I didn’t even notice that difference. Note to self: read all the way down lol

So would listed mean multiple entries in one file?

The most misleading part for me is “will return the content of a directory” as apose to the “content of a list”

No, a list looks like this:

component:
  - name: listed_1
    option: something

  - name: listed_2
    option: something 

And names look like this

component:
  name_1:
    option: something 

  name_2:
    option: something 

The former bit is correct, it returns the contents of the directory, you just need to return it as a list (for components that need lists) or names (for components that need names).