Custom Entity Types?

Is it possible to somehow (without really coding in the guts of HA) create your own custom entity types in a .yaml configuration file or the like - so that you can manipulate and pass around from automations to scripts, etc. (similar to how you can call a generic script with a variety of entity types to reduced redundant code in automations)?

What are you attempting to achieve? :wink:

If I want to be abloe to do a bunch of similar things to a variety of different entity types in a script. It would be wonderful if it was possible to overload scripts like overloading in C++

Still pretty vague. Some pseudo-code, maybe?

This is not a specific example I am asking conceptually. I want to be able to pass a custom entity to a script