Compile to an older version of esphome?

I have a sensor that is currently effected by a bug. I had an older .bin file saved that I was able to flash and get the sensor back up.

Unfortunately there is an automation in the sketch that is no longer needed. Is there away to specify the version of esphome that I want to use to compile?

Or do I have to roll back esphome? The only backup of esphome version is months old and I rather not roll back that far. The option to specify esphome ver has to be removed, is this no longer an option?

looking for a solution to this as well. I have a device that was working, but now not. I want to see if I can compile and other version to see if it works. Did you figured it out??