Configuration invalid in new hassio setup

light.yaml file is in packages directory but system cant read this file . I am tried to place packages: !include_dir_named packages/in different places in configuration file.

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
  packages: !include_dir_named packages/

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
   base_url: ********.duckdns.org
   ssl_certificate: /ssl/fullchain.pem
   ssl_key: /ssl/privkey.pem
   
# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
input_boolean: !include include/input_boolean.yaml
input_number: !include include/input_number.yaml
input_select: !include include/input_select.yaml
sensor: !include sensors.yaml
zone: !include zones.yaml

00
17

if i place homeassistent: on top in configuration.yaml file then face a invalid configuration.
53

30

Packages is a “subset” of homeassistant: so it needs to be listed under that domain.

As your error message states, flash is NOT a valid option for mqtt light.

As indicated by the page that the error message tells you to go to, you need to use template or json

Don’t indent packages under default_config:

homeassistant:
  packages: !include_dir_named packages

default_config:

same error after change light.yaml mqtt to mqtt template.40 35 06

Just remove the line flash: from your mqtt light config and test…why is this hard?

same error after remove the line.

light:
    platform: mqtt
    schema: template
    command_topic: "home/gjesterom_lysT3/set"
    command_on_template: "on"
    command_off_template: "off"

You keep showing bits and pieces of your config…if you want help you need to share more information.

I just use one light in light.yaml for define the error. before the new installation, all lights were in working condition here is my old light.yaml

light:
  - platform: mqtt
    name: "Gangen lys"
    command_topic: "cmnd/Ganganlys T1/power"
    state_topic: "stat/Gangan lys T1/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
  
#        GJESTEROM LYS
#################################################
  - platform: mqtt
    name: "Gjesterom lys"
    command_topic: "cmnd/gjesterom_lysT3/power"
    state_topic: "stat/gjesterom_lysT3/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
  
#        SOVEROM LYS
#################################################
  - platform: mqtt
    name: "Soverom lys"
    command_topic: "cmnd/soverom_lysT3/power"
    state_topic: "stat/soverom_lysT3/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
  
#        SPISEBORD LYS
#################################################
  - platform: mqtt
    name: "Spisebord lys"
    command_topic: "cmnd/Spisebord_lys/power"
    state_topic: "stat/Spisebord_lys/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
  
#        STUE LYS
#####################################################
  - platform: mqtt
    name: "Stue lys"
    command_topic: "cmnd/stue_lysT2/power"
    state_topic: "stat/stue_lysT2/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

Based on your error messages, you have a problem with an mqtt light somewhere and you have defined a flash option. Find that mqtt light and fix it.

Light working in configuration.yaml, but if i put light.yaml file in config/packages then not working more.

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
   base_url: XXXXXXX.duckdns.org
   ssl_certificate: /ssl/fullchain.pem
   ssl_key: /ssl/privkey.pem
   
   
# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
input_boolean: !include include/input_boolean.yaml
input_number: !include include/input_number.yaml
input_select: !include include/input_select.yaml
sensor: !include sensors.yaml
zone: !include zones.yaml

light:
  - platform: mqtt
    name: "Spisebord lys"
    command_topic: "cmnd/Spisebord_lys/power"
    state_topic: "stat/Spisebord_lys/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

I suppose you just don’t want to post your packages yaml?

How are you including light.yaml in the package you’re creating?

What does the file structure look like?

This is my new hassio installation. In packages folder is only light.yaml which i posted here. light.yaml

How are you including light.yaml in the package you’re creating?

I just create a packages folder in config and move my light.yaml file in packages folder.

How are you including light.yaml in the package you’re creating?

light.yaml file path: /config/packages/light.yaml

and in configuration.yaml like below.

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
  packages: !include_dir_named packages/

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
   base_url: ********.duckdns.org
   ssl_certificate: /ssl/fullchain.pem
   ssl_key: /ssl/privkey.pem
   
# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
input_boolean: !include include/input_boolean.yaml
input_number: !include include/input_number.yaml
input_select: !include include/input_select.yaml
sensor: !include sensors.yaml
zone: !include zones.yaml

I tried also like

homeassistant:
    packages: !include_dir_named packages/

default_config: 

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
   base_url: ********.duckdns.org
   ssl_certificate: /ssl/fullchain.pem
   ssl_key: /ssl/privkey.pem
   
# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
input_boolean: !include include/input_boolean.yaml
input_number: !include include/input_number.yaml
input_select: !include include/input_select.yaml
sensor: !include sensors.yaml
zone: !include zones.yaml
default_config: 
  packages: !include_dir_named packages/

That’s wrong

homeassistant: 
  packages: !include_dir_named packages/

Syntactically this is correct but how does the packages process the files located in the directory? I don’t see where you’ve defined a package.

30 seconds with the documentation says you’re not creating a package, but trying to dump your yaml in a packages directory and not define anything