Subfolders for large esphome projects

Hi - I do have an esp32-p4 board and found a big UI-Project: GitHub - alaltitov/Waveshare-ESP32-P4-86-Panel-ETH-2RO: Waveshare-ESP32-P4-86-Panel-ETH-2RO firmware

Now I am not sure how to organize this big project. I do not want to add all files into the /config/esphome/ folder.

Workaround: copy the main.yaml to the config dir /config/esphome/. Change all relative path to one subfolder like esp32-p4. In the main.yaml its easy to replace but also I need to replace all path in all files inside the new esp32-p4 folder.

Is there a better way? Can I get esphome to scan subfolders - so I can have a subfolder for every board?

Thanks for your help!

What is your install method

What do you mean?
I installed esphome in homeassistant via addon.

I installed the project by copying it into the /config/esphome/esp32-p4/ folder (the files from src folder) and the main.yaml directly to /config/esphome/esp32-p4/main.yaml

I was not sure if you were using docker or vm

Read up on !include:.

https://esphome.io/guides/yaml/#include

Also there are packages - which may be relevant depending on how you want to structure your devices. A package resides on Github.

Packages are a good way, better than include. And they do not have to reside on github, all my packages are files in subfolders. You can even pass parameters to packages if needed for packages that are used in multiple places.

2 Likes