!include at top level

This is a snippet from the config I’m trying. It’s perfectly logical and straightforward, and nothing in the documentation so much as implies that it wouldn’t work.

!include platforms.yaml

homeassistant:
  <etc>

It doesn’t work, and produces a cryptic error:

$ hass --script check_config --files
Testing configuration at /home/hass/.homeassistant
2017-08-06 18:23:29 ERROR (Thread-2) [homeassistant.util.yaml] mapping values are not allowed here
  in "/home/roothorick/hass/core.yaml", line 5, column 14
2017-08-06 18:23:29 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/hass/.homeassistant/configuration.yaml: mapping values are not allowed here
  in "/home/roothorick/hass/core.yaml", line 5, column 14

My best guess is it’s trying to tack on the homeassistant: block to the last block in platforms.yaml. Why? Is this intentional? Bug? Is there any way to do what I want?

I think this note from “splitting up the configuration” does in fact imply that this won’t work:

Note that there can only be one !include: for each component so chaining them isn’t going to work. .

Your include isn’t associated with a component.

What are you trying to do with this configuration?
Maybe have a look at packages…

5 Likes