Configuration 2

I am new with Home Assistant and struggling with the formating. I am trying to split my configuration.yaml file up so I can understand it better, I have the main configuration.yaml file and trying to add a link to add another file call alarm.yaml. Here is what I have in the configuration file.:

Customization file

customize: !include customize.yaml
alarm: !include alarm.yaml

I get the following error:

Configuration invalid
extra keys not allowed @ data[‘alarm’]

I am stuck here. Thank for your input.

need to post the whole thing including the contents of alarm.yaml. Only thing I see off the bat is that customize should be under the homeassistant: section not at the root level.

Also, follow the directions in blue at the top of the page. They will show you how to properly format yaml when posting it.

in principle your approach is correct but you have to watch a few things causing trouble

  • ensure there is no other object called ‘Alarm’ … this can cause naming conflict in some cases. I have named all my yaml files like … cfg_Alarm.yaml , cfg_lights.yaml
  • ensure the formatting in your Alarm.yaml is correct as this can throw errors as you have shown … if not sure you can Comment section by section and use the “Check Config” option in HA
  • and as @petro mentioned… read the guidelines on how to post content… reason for this is that YAML is very sensitive with formattting especially with the amount of “leading spaces” in your config files. the posting guidelines will ensure that the original format will be maintained and the community here can give you proper feedback

hope this helped

Thank you looking into what you suggested

thank you still looking into the problem

Your issue is very easy to fix. Just post your yaml and it will be pointed out in seconds.

Thanks had a problem and saved the configuration.yaml file with the error. Had to reinstall the complete program.
Question one: Does a backup give you the ability to reload Home assistant?

Now the real problem, Receive the check configuration error: Configuration invalid CHECK CONFIG extra keys not allowed @ data[‘cfg_alarm’]

Here is my configuration file:

In folder: Alarm Panel
cfg._alarm. yaml


Thanks for your help in advance, sorry for the long post.

First of all,use the code tags in the forums and post your code. Screenshots are terrible for troubleshooting

Secondly, what component is ‘cfg_alarm’? I don’t think that component exists.

Is “konnected_token” really the token or are you trying to use secrets?

In configuration.yaml change line 16 to this:
cfg_alarm: !include ./Alarm_Panel/cfg_alarm.yaml

What component is cfg_alarm?


My understanding is that the OP is sub-dividing the configuration.yaml file and has chosen to define all of the security-related entities in the cfg_alarm.yaml file (located in the Alarm_Panel sub-directory).

That maybe the case, but he’s linked the file under a sub-key called cfg_alarm, under homeassistant: which doesn’t exist, so we need to know what he’s trying to achieve by using that key.

1 Like

Good point. So then the !include entry belongs elsewhere, perhaps with all the others around line 70, for clarity.

If its for the customize section, it should be

customize 2: Alarm_Panel/cfg_alarm.yaml

Is this supposed to be a package?

If so, line 16 and 17 should be:

    cfg_alarm: !include PATH_TO_FILE

It’s hard to say what he wants. All conjecture at this point until he responds.

Place your bets…


My suggestion was in response to the OP’s very first post:

However, the requirement may have changed over the course of the thread.

Wow I am way over my head here.

1, How do you post the yaml file, snap shot are not good?
2, All I am trying to do it just split the yaml file up so it is more manageable.
3. Even if I combine the two files I still get the error.

Feeling pretty dumb here.

I’m thinking you need to have a read of the docs and work out what you’re actually trying to do.

You can’t just ‘split the configuration’, you have to split it in defined ways so that the system can put it back together correctly.

Start here…

1 Like