Check_config queston

I am using check_config to check my configuration.yaml and customize.yaml files and am receiving this error message:

Testing configuration at /home/homeassistant/.homeassistant
Failed config
  homeassistant:
    - extra keys not allowed @ data['customize']['name']
    - customize: [source /home/homeassistant/.homeassistant/configuration.yaml:2]

My configuration.yaml file is:

homeassistant:
  customize: !include customize.yaml
  packages: !include_dir_named packages/

The start of my customize.yaml file is:

# Name of the location where Home Assistant is running
name: !secret home_name
# Location required to calculate the time the sun rises and sets
latitude: !secret home_latitude
longitude: !secret home_longitude

If I comment out the name line in customize, then the error refers to latitude.

Any suggestions to correct this error will be appreciated.

because those attributes don’t go in the customize section, they go in the home assistant section.

homeassistant: !include homeassistant.yaml

homeassistant.yaml

# Name of the location where Home Assistant is running
name: !secret home_name
# Location required to calculate the time the sun rises and sets
latitude: !secret home_latitude
longitude: !secret home_longitude
customize: !include customize.yaml

customize.yaml

sensor.xxx:
  name: foo
  icon: mdi:bar
1 Like

Thanks for your help. It allowed me to correct my problem.