Script won't load when I split it up but working fine within configuration

Hi I tired to moved my scripts to a folder and I keep getting below error when a reboot hassio and reloaded scripts. I have also attached a example script, which was working before within configuration under script:.

Error:

remove:Group ‘all_scripts’ doesn’t exist!

configuration.yaml

script: !include_dir_merge_list script

script/light.yaml

  flash_lights:
    alias: Flash Lights
    sequence:
      - service: homeassistant.turn_on
        data:
          entity_id:
            - light.bedroom_light
      - delay:
          seconds: 1
      - service: homeassistant.turn_off
        data:
          entity_id:
            - light.bedroom_light
      - service: script.turn_on
        data:
          entity_id: script.light_loop
  light_loop:
    alias: Light flash loop
    sequence:
      - delay:
          seconds: 1
      - service: script.turn_on
        data:
          entity_id: script.flash_lights
  light_loop_kill:
    alias: Kill flashing lights
    sequence:
      service: script.turn_off
      data:
        entity_id: script.light_loop

As a starter for 10 - Scripts are not listed, they are named, so using !include_dir_merge_list will never be correct.

Can’t help much more than that without knowing the full contents of your script folder.

Currently there is only one file light.yaml. I was just following a configuration file from here : https://github.com/CCOSTAN/Home-AssistantConfig

OK, well, first thing to note is that our friend and colleague @CCOSTAN uses !include_dir_merge_named to reference his script folder, not !include_dir_merge_list.

But if you only have one file, and the path to the file is script/light.yaml then you should just use

script: !include script/light.yaml
1 Like

Ok …

So what happen if I want to add more files?

Do i use same configuration as before?

Again, it depends how you split them up, which is why I wanted to see the contents of the folder :slight_smile: