appdaemon icon indicating copy to clipboard operation
appdaemon copied to clipboard

Removing apps.yaml generates new apps.yaml with broken content

Open markusressel opened this issue 7 months ago • 2 comments

What happened?

Removing the apps.yaml causes AppDaemon to generate a new apps.yaml, even if there are other app configurations (with different names) present.

The generated config contains the following content:

hello_world:
  module: hello
  class: HelloWorld

which leads to an error on startup, because there doesn't exist a matching hello.py and HelloWorld class.

Version

4.5.0

Installation type

Docker container

Relevant log output


Relevant code in the app or config file that caused the issue


Anything else?

I would suggest to not generate an apps.yaml file if there are other apps present.

The current workaround is to remove all of the content of the apps.yaml file, but not delete the file itself.

markusressel avatar May 28 '25 01:05 markusressel

I agree - this shouldn't be happening. I'll take a look

jsl12 avatar May 28 '25 01:05 jsl12

This is most likely the docker startup script - it has some default behavior when it doesn't find apps.yaml in the top level directory. We can look into making it a little smarter.

acockburn avatar May 29 '25 18:05 acockburn