Accidentally deleted two devices in esphome

I accidentally deleted two devices from my esphome tab. The associated entities are still in Home Assistant. What is the best (easiest) way to recover the devices? Hopefully without having to redo all the associated automations. Is there some way to just get esphome to see the devices?

If you have a recent backup open it up with 7zip or winrar and then open up the homeassistant.tar.gz archive inside.

Copy the missing device yaml files from data/esphome in the archive to config/esphome on your system.

1 Like

While doing some browsing in the file editor I realized that the yaml files are in /homeassistant/esphome/trash/. Is there some way to move them back to /homeassistant/esphome/?

Nevermind. Found a solution. Visual Studio supports drag and drop so just drug it into the proper folder. Thanks for stealing me in the right direction.

1 Like