Upload binary from a desktop

My machine that is hosting esphome is in a difficult location to access. I’d like to be able to easily switch back and forth between sketches written with the Arduino IDE, and firmware that was created with ESPHome. Obviously I can just overwrite the ESPHome firmware from my desktop with a sketch anytime I want. But getting the ESPHome firmware back requires me to go back to the machine running ESPHome.

What I’m hoping to do is create a generic ESPHome firmware that doesn’t do anything, and then download the .bin file. After overwriting that with an Arduino IDE firmware, I would like to upload this .bin file from my desktop. Then I can use ESPHome OTA to push my new code.

Since you can download the .bin file, I’m assuming there is a way to write it back to the Arduino. How? Is this the same thing as a .hex file that you can use avrdude to write using the usb/serial port?

Take a look at this, may be it fits your need https://github.com/esphome/esphome-flasher