I have some MCUs that are constantly used for experimenting.
It turns out that the YAML code for these MCUs fills up with more and more blocks of code that are commented out because they came from other experiments and I don’t want to loose them.
It would be much easier to use multiple YAML files for the same MCU and load one or the other into it.
So I tried to create different files with identical esphome.name settings. But the problem is that ESPHome derives both the compilation path as well as the WIFI hostname from this name setting.
So I can choose between two horns of the torro to kill me:
- I use a different esphome.name in both YAML files
In this case ESPHome will assign a different WIFI hostname and will not find the MCU for upload.
So this option is a no-go. - I use the same esphome.name in both YAML files
Now ESPHome uses the same compilation path for both YAML files. Switching between the two takes a lot of time because everything is compiled from scratch.
So this option works but is time consuming.
Is there a more elegant way to switch between multiple YAML files for the same MCU?
Maybe one that uses distinct compilation folders for each YAML file but the same MCU hostname for the final upload?