Why does this second include file work for switch, but not for script?

switch: !include rf_switches.yaml
switch 2: !include ir_switches.yaml

script: !include script.yaml
script 2: !include script_alexa.yaml

the script_alexa.yaml is not being loaded at all.

As explained in the troubleshooting guide, what does the following command show?

hass --script check_config --files

i think you have to rename the first script.yaml into something like script_1.yaml

still not working

script: !include main_script.yaml
script 2: !include alexa_script.yaml

and my yaml validates.

So please show us the output of the command I listed, and both the (correctly formatted - see the blue box at the top) entry in the configuration.yaml, and the content of the script_alexa.yaml file.

pi@piHass:~ $ hass --script check_config --files
Testing configuration at /home/pi/.homeassistant
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up http
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up recorder
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up api
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up history
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up frontend
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up updater
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up sun
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up climate
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up notify
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up script
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up sensor
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up emulated_hue
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up automation
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up discovery
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up zone
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up switch
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up logbook
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up camera
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up config
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up zeroconf
17-04-28 18:47:36 INFO (MainThread) [homeassistant.setup] Setting up ios
yaml files (used / not used)
- /home/pi/.homeassistant/alexa_script.yaml
- /home/pi/.homeassistant/automation.yaml
- /home/pi/.homeassistant/cameras.yaml
- /home/pi/.homeassistant/configuration.yaml
- /home/pi/.homeassistant/groups.yaml
- /home/pi/.homeassistant/ir_switches.yaml
- /home/pi/.homeassistant/known_devices.yaml
- /home/pi/.homeassistant/main_script.yaml
- /home/pi/.homeassistant/rf_switches.yaml
- /home/pi/.homeassistant/script.yaml
- /home/pi/.homeassistant/switches.yaml
- /home/pi/.homeassistant/zones.yaml

not sure what good that’s gonna do ya with the lack of colors showing what was used and un-used, the alexa file says it was used, yet no scripts within were loaded. all i’m trying to do here is seperate the scripts that alexa can see in the emulated hue from my other scripts that alexa doesn’t need to know about. all i did was copy and paste existing, working, yaml code.

Now we just need the other information I asked for:[quote=“Tinkerer, post:5, topic:16642”]
both the (correctly formatted - see the blue box at the top) entry in the configuration.yaml, and the content of the script_alexa.yaml file.
[/quote]

i keep telling you that’s NOT the issue, but FINE.

emulated_hue:
  type: alexa
  host_ip: 10.11.12.23
  exposed_domains:
    - script

switch: !include rf_switches.yaml
switch 2: !include ir_switches.yaml

#script: !include script.yaml
script: !include main_script.yaml
script 2: !include alexa_script.yaml

alexa_script.yaml

  game:
    alias: 'Game'
    sequence:
     - service: switch.turn_on
       entity_id: switch.tv_input
     - service: switch.turn_on
       entity_id: switch.tv_three

  media:
    alias: 'Media Player'
    sequence:
     - service: switch.turn_on
       entity_id: switch.tv_input
     - service: switch.turn_on
       entity_id: switch.tv_four

  server:
    alias: 'Server'
    sequence:
     - service: switch.turn_on
       entity_id: switch.tv_input
     - service: switch.turn_on
       entity_id: switch.tv_five

  antenna:
    alias: 'Antenna'
    sequence:
     - service: switch.turn_on
       entity_id: switch.tv_input
     - service: switch.turn_on
       entity_id: switch.tv_zero

  all_lights:
    alias: "Lights"
    sequence:
      - service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.switch_3
      - service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.switch_2
      - service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.switch_4
      - service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.switch_5

  wall:
    alias: "Wall"
    sequence:
        service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.switch_3

  mirror:
    alias: "Mirror"
    sequence:
        service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.switch_4

  desk:
    alias: "Desk"
    sequence:
        service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.switch_2

  air:
    alias: "A-C"
    sequence:
        service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.switch_1

  tv:
    alias: "TV"
    sequence:
        service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.tv_power

  soundbar:
    alias: "Speaker"
    sequence:
        service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.soundbar_power

#  apple:
#    alias: "Apple"
#    sequence:
#        service_template: >
#          {% if requested_state == 'pause' %}
#            switch.turn_off
#          {% elif requested_state == 'play' %}
#            switch.turn_on
#          {% endif %}
#        entity_id: switch.apple_play_pause

  comp:
    alias: "Computer"
    sequence:
        service_template: >
          {% if requested_state == 'on' %}
            switch.turn_on
          {% elif requested_state == 'off' %}
            switch.turn_off
          {% endif %}
        entity_id: switch.switch_5

  set_thermostat:
    alias: "Thermostat"
    sequence:
     - service: climate.set_temperature
       data_template:
         entity_id: climate.cooler
         temperature: "{{ requested_level }}"

Well, if you’re going to take issue with my trying to help you, I won’t bother :wink:

sounds more like you won’t admit it’s not the yaml code causing it not to load.