Custom esphome components with lots of includes

I have been looking at what another forum member has done getting an esp8266 to play mp3s using tasmota and the esp8266 audio library, and I am trying to port it over to esphome.
What I am finding though is there are huge libraries with lots of nested includes. Is there an easy way to include all of these libraries in esphome? Or compressing then down to one include? Or any other way of approaching it?

1 Like

Not that it answers your question, but the dfplayer component may be easier https://esphome.io/components/dfplayer.html

Other than that, can you point to the other project you are emulating?

Thanks, the dfplayer doesnt do streaming from an HTTP URL as far as I know.

The project I am trying to emulate is this one:

specifically the HTTP mp3 example

I was able to get the example playing from memory to work, but the streaming from HTTP seems to have a big tree of includes, and Im struggling to figure out how to identify each one and/or flatten them so they can be easily included in an esphome custom component.