Missing automations

In the last few days I’ve noticed that my automations for a particular light haven’t been working. The automations are stored in a separate config file in my packages directory alongside various other config files, all of which are working, as far as I’m aware.
If I go into “Unused entities” or the Automation Editor the automations in the file aren’t appearing there, which is presumably why they aren’t working.
How do I get them to appear again? Is there a way to debug what’s happening? I can’t see any related errors in the logs.

Thanks.

You could try running:

hass --script check_config -f

It should output the YAML files it reads.

Or if you don’t know how to do that, you could post the file contents here and we can do a sanity check. But if you’re not getting errors…

Thanks! I’m running Hassio, so I don’t think I have access to the hass command. Is there a way to do it via the hassio command?

No idea. I never got within 200 miles of hassio. :stuck_out_tongue_winking_eye:

1 Like

I don’t think so. Try

hassio homeassistant check --help

to see what’s possible

Thanks. It looks like hassio homeassistant check doesn’t have any additional options.
When I run it I just get.

Processing... Done.

Command completed successfully.

So, I just moved the file from /config/packages/hallway/light.yaml to /config/packages/hallway_light.yaml and now the automations have reappeared.

Does anyone know why that would be?

Anything in particular?

Did you read it? How did you configure packages? Now compare that against your question.

Oh, I thought maybe you had an answer to my question.

Did you read the doc, because it explains how this works. Is there something you didn’t understand?

I also asked how you configured packages. I can’t provide an answer without information. If you’d like help then please share the package configuration (probably inside configuration.yaml.)

I’m pretty sure this behaviour isn’t expected, so I’ve opened it as a bug.

Does it need “merge”?

From Packages documentation:

The following example allows to have subfolders in the packages folder, which could make managing multiple packages easier by grouping:

homeassistant:
  packages: !include_dir_merge_named packages/

Tnx to the pointer Salty! This is a solution for me. This at least allows me to work around the limitations of include_dir_named, by now having control over the package name.

Also, this was added just 14 days ago to the documentation by https://github.com/home-assistant/home-assistant.io/pull/11971

1 Like

And how do you run a script?