Trouble adding !includes to my configuration.yaml

so my configuration.yaml looks like this. when I go to "check config I get the following error

nvalid config for [light]: required key not provided @ data[‘platform’]. Got None. (See /config/configuration.yaml, line 14). Please check the docs at https://home-assistant.io/components/light/

if i go #light: !include lights.yaml
then everything is good, no errors

any ideas and what the issue is?

homeassistant:
  # Name of the location where Home Assistant is running
  name: xxxxxxxxxx
  # Location required to calculate the time the sun rises and sets
  latitude: xxxxxxxx
  longitude: xxxxxxxxx
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 718
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/Edmonton
  customize: !include customize.yaml
  
light: !include lights.yaml
secrets: !include secrets.yaml
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
device_tracker: !include device_tracker.yaml
switch: !include switches.yaml
sensor: !include sensors.yaml

my includes look like this:

    group:              !include_dir_merge_named group
    script:           !include_dir_merge_named script
    shell_command:    !include_dir_merge_named shell_command
    input_number:     !include_dir_merge_named input_number
    input_boolean:    !include_dir_merge_named input_boolean
    input_datetime:   !include_dir_merge_named input_datetime
    automation:       !include_dir_merge_list automation
    sensor:                 !include_dir_merge_list sensor
    binary_sensor:          !include_dir_merge_list binary_sensor
    switch:                 !include_dir_merge_list switch
    notify:                 !include_dir_merge_list notify

@cyn

the way the “light:” is included in the original post is perfectly OK. There’s no need for those extra spaces.

@J5L7R

post the contents of your “lights.yaml” file.

It’s saying that you have defined a light there but gave no platform so the light component doesn’t know what to do with it.

What kind of light are you trying to add?

this is what I have so far in my lights.yaml file.
because of the error I #light: !include lights.yaml
and moved it back to my configuration.yaml file.
I should note that since the update to 77.3 the limitlessly no longer works for some reason.

light:
  - platform:  limitlessled
    bridges:  
      - host: 192.168.1.68
        version: 6
        port: 5987
        groups:
        - number: 1
          name: Desk Bridge
          type: bridge-led
          fade: on
        - number: 1
          name: Desk Strip
          type: rgbww
          fade: on
        - number: 2
          name: Wall Effect
          type: rgbww
          fade: on

two things I see:

when you !include yaml files you shouldn’t put the domain in the !include file. It’s already there from the include statememt. So take “light:” out of the lights.yaml file. But leave the 2 spaces before “- platform:”

next, and I’m not sure this is a real problem, but it looks like you have an extra space in your “platform:” definition line between “platform:” and 'limitlessled". try taking that out. there should only be one space between them.

try those and see if it works.

1 Like

A million thanks, i knew it was probably a can’t see the forest for the trees type thing.
Removing “light” from the lights.yaml solved my little include issue.

you’re also right about there being an extra space between platform: and limitlessled
i removed it, but alas still no luck.

someone needs to put out a “home assistant for dummies” book, for me. lol

but appreciate your help

Yeah, no problem. Another set of eyes is always a good thing.

as far as the limitlessled I don’t use it so I’m not much help past this. as far as I can tell your config looks like the docs say it should be.

And if it was working before maybe there’s a breaking change or a bug in the update?

1 Like