Develop automations as Home Assistant Components

I have previously written some light control logic in AppDaemon, because I wanted to have multiple instances, keep some internal states, and have more complex logic. However, I would like to have tighter integration with Home Assistant (e.g. having parameters as inputs and states as values in the GUI), and possibly contribute them upstream.

What about developing automations using custom components? Is that overkill vs developing them in Appdaemon? I would think that could be a bit “cleaner” also, instead of having a separate program running.

May have misunderstood the question but you can pass variables to AppDaemon.

https://www.home-assistant.io/docs/ecosystem/appdaemon/api/

I pass Entity_Id’s as variables . So I can reuse code .

Yes, I already do that, so Appdaemon solves parts of my problem. I was more wondering about whether developing custom components is a good alternative, and maybe also how interesting it is to get generic automatisation contributions upstream.

I feel a component for e.g. light automation would be better if it could automatically show a card with state etc.