I am using EspHomeLib to create simple ESP32 devices, e.g., LED strip with PIR sensor.
I would like to have multiple devices like this, but to integrate them into HA is a bit painful when I want to have some more complex settings available from HA. It requires a timer, input_number, timer_slider and multiple automation.
Like this:
My configuration is split according to guidelines. But this requires to have multiple source files for this one component which seems to be really redundant. Too much code duplication and too many files need to be created to introduce a single component.
Is there a way how to do this by a template? To have only one codebase and instantiate new components somehow? Or duplicate it, but have it at least in one file – one ESP, one file with light, switch, timer…
Full configuration of original project is here.