Package homeassistant contains invalid customize

I get this error since I hace changed my configuration based on packages

Package homeassistant contains invalid customize

This is in my homeassistant package:

homeassistant:
  customize: !include ../customizations/customize.yaml

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

  auth_mfa_modules:
    - type: totp
  whitelist_external_dirs:
    - /config

And this is my customize.yaml

binary_sensor.adguard_protection:
  friendly_name: AdGuard Protection
camera.sunmap:
  friendly_name: Day and Night World Map
#light.living_room_spot_dimmer:
#  friendly_name: Living Room Spot Lights
sensor.attic_nest_protect_co_status:
  friendly_name: Attic CO
  icon: mdi:alert
sensor.attic_nest_protect_smoke_status:
  friendly_name: Attic Smoke
  icon: mdi:fire
sensor.entryway_nest_protect_co_status:
  friendly_name: Entryway CO
  icon: mdi:alert
sensor.entryway_nest_protect_smoke_status:
  friendly_name: Entryway Smoke
  icon: mdi:fire
sensor.hallway_nest_protect_co_status:
  friendly_name: Hallway CO
  icon: mdi:alert
sensor.hallway_nest_protect_smoke_status:
  friendly_name: Hallway Smoke
  icon: mdi:fire
person.dennis:
  entity_picture: /local/icons/dennis.jpg

This is my entire config: https://github.com/denniswham/Home-Assistant-Configuration
Anyone who can identify what the problem is?

Try removing the comments… I think I have run afoul of that before.

alternately… maybe /config/customizations/customize.yaml ?

default_config: is not a subkey of the homeassistant core component.

Thanks Marc, fixed this one.

Have removed the entire customize: under homeassistant:, but even then I keep on receiving the error
“Package homeassistant contains invalid customize” after a HA restart.

Is there any way to “reset” the customize.

Found the issue and resolved it. In my configuration.yaml I had

default_config:

homeassistant:

  # Load packages
  packages: !include_dir_named integrations

And homeassistant package I had:

default_config:

homeassistant:
  customize: !include customizations/customize.yaml
  
  auth_mfa_modules:
    - type: totp
  whitelist_external_dirs:
    - /config

The issue being that homeassistant: was twice in my configuration. I moved everything under homeassistant in the package to the configuration.yaml, and removed the package. Now works like a sharm again.

@frenck and @JuanM, I’m quite sure you’re currently facing the same issue since I looked at your configs when changing my config to use packages.

No, that issue does not apply to me.

I can say with certainty that that was not your issue. You have always been able to have homeassistant entries in multiple packages.

The problem is that you were defining packages within packages by the looks, which you can’t (and should never want to) do.

Hmmm, still don’t understand it, may be I’m overlooking something here. If I move the customize to the homeassistant package like Frenck’s config, the error occurs again and customizations don’t work.

I just keep the customize in the configuration.yaml for now, and not use a homeassistant package, that resolves it.

Thanks for your thoughts anyway!

1 Like

No issue here

Same issue here. also things like whitelist_external_dir work only in the main yaml (within the root). Not a problem for me though to have the homeassistant config in the root file.

I had the same issue and the culprit is the mfa module. Remove that and it works.