!include: some .yaml files not recognized

Hi everybody,

I just stumbled upon this when I had issues with the neato integration: sometimes¹, some .yaml files in my packages folder are not recognized by Home Assistant until I rename them.

¹ I cannot say for sure what causes this / when this will occur.

This is the relevant part of my configuration.yaml

homeassistant:
  packages: !include_dir_named packages

Then there is <root>/packages, containing this file 01.yaml only

homeassistant:

Then there are sub directories such as

  • homeassistant
  • house
  • lights
  • remotes
  • vacuum
  • etc.

These sub directories contain multiple .yaml files, here is a short example from homeassistant/neato_int.yaml

neato:
  client_id: !secret neato_clientid
  client_secret: !secret neato_clientsecret

This file was previously named neato.yaml (instead of neato_int.yaml now). Until I renamed it, it was not recognized by Home Assistant (not during restarts of hass, nor the entire server it runs on).

I also had the same issues with a file in lights. All the sudden, the groups and automations defined in that file (flur.yaml) were missing. I check the configuration, there were no errors. I don’t remember all the stuff I tried, but eventually I renamed the file to flur_new.yaml - and right after this, the groups and automations were available again (after reloading them via the webUI).

Ideas

My first idea why this was that I had two files named neato.yaml; one was homeassistant/neato.yaml (containing the credentials to connect to the API) and vacuum/neato.yaml (containing all automations connected to this vacuum robot).

However… I did not have a second flur.yaml, so I don’t believe having two files with the same name did cause the issue.

However, renaming a file that’s not recognized works right away… I also checked each file that was before the file in question alphabetically on errors, so perhaps if flaaa.yaml had an error, it wouldn’t load flur.yaml, which came right afterwards. But this was not the case. Neither the webUI reported an error when checking my configuration, nor manually testing these files showed any errors.

I fixed this now… but it made me think, what if there are other automations I set up (and depend on) that are currently not recognized without me knowing (because there is no error message about this anywhere)? I have some automations that are supposed to only happen when we are on vacation, so I won’t notice them not working until all presence sensors have been set to not_home for 24 hours. The automations/groups in question were noticed right away because I was working on them…

tl;dr is there a way to check whether all included yaml files are actually recognized by Home Assistant? Or how can I be sure all those files actually work? The flur.yaml had previously worked fine, so there was nothing wrong with the file itself. The only fix was renaming it to something else and it worked again.

Thank you for your input :slight_smile: