Revert to prior ESPHome?

Is there a process to revert to a prior release of ESPHome? I could restore my Home Assistant to a couple of days ago, but I don’t recall what minor changes I’ve made. Mostly in the dashboards.

Here’s my problem. I upgraded ESPHome yesterday and upgraded a few of my devices as well. But one would not come online again. Fortunately it was a Sonoff Basic that was easy to reach. I plugged in a UART to manually flash the latest bin file. When I restarted the device, the WiFi would not connect. I tried flashing the bin file to a Wemos D1 Mini and it connected to WiFi. I flashed an Arduino sketch to the Sonoff, and it too connectd to WiFi.

I also made a new device, new Sonoff Basic, new ESPHome code and it also would not connect to WiFi.

To summarize:

  • Sonoff Basic, ESPHome .bin file, no WiFi.
  • Wemos D1 Mini, same .bin file, WiFi connects OK.
  • Sonoff Basic, flashed with an Arduino Sketch, WiFi connects OK.

I tried flashing the same .bin file to a new Sonoff Basic- no WiFi.

So, it looks like everything I tried connects the ESP to WiFi except the .bin file from ESPHome. My thought is that I should try an earlier version of ESPHome.

Yes. Restore the partial backup you made before updating. This only updates (downgrades) the ESPHome add-on.

I don’t make partial backups, but maybe I can do a partial restore? Also, where can I see the version of ESPHome that is installed?

Unless you specifically un-ticked the option when you installed the new version a partial backup was made.

Updating from Settings → System → Updates


.

Updating from the Add-on page

Thanks for the tips. In all the years I’ve been using Home Assistant, this is the first time I had to do a partial restore.

But reverting from 2024.4.0 to 2024.3.2 fixed my issue.

I recompiled the bin file and flashed it on two different Sonoff Basica, and both connect to WiFi right away.

I never un-check “create backup” thinking that you can never have too many backups. But this probably does rate an issue report on the GitHub.

I’m using this you can install older ESPHOME next to latest one. For me best solution because of wifi issues all the time with latest one. Everytime update devices and if not work update them.back with the older ESPHOME version.

2 Likes

Thanks- It’s nice to know they are available. In this case, I had a partial backup from the prior version.

As I said above, this is the first time in years that I have needed a partial restore.

1 Like

Glad the partial restore worked in this case!

I’ll just throw one more idea out there for future viewers. I’ve found it’s much more convenient to run ESPHome natively on my laptop, rather than as an add-on in HA. I still have the add-on, just in case, but I never use it for developing or updating my ESP devices.

For one thing, my laptop has more horsepower than my poor little RPi running HA. For another, I’m reducing the writes to the SD card running HA. I’m generally sitting at my laptop when doing ESPHome work anyway.

Oh, and I always un-check the partial backup option. When writing to an SD card, yes, you can have too many backups. I copy my config folder to my NAS on a regular schedule, and only use the HA full backup before making major changes.

1 Like

Since I run HAOS on an Intel NUC i3 with a 2TB SSD, backup size is no issue here. (Then, there is Frigate…)

Similar here, have esphome running on a separate Pi4, on my desk, USB-Cable attached in case OTA does not work, no impact on my “Production” HA System from development work
Also HA doesn’t know about the EspHome version installed and does not yell at me because I’m again a couple releases behind

Edit: and downgrading to a specific version is as simple as
sudo pip3 install -U esphome==202x.y.z

1 Like

I am documenting how I fixed this issue, specifically I simply did a partial restore from backup.

For my notes, how do you install an older ESPHome version in HAOS?

check the GitHub link I post. Everything is explained.

Thanks, but the github describes how to install ESPHome. Are you saying that I just install the older version as if I didn’t have ESPHome currently installed?

You can install a older version of esphome next to the latest one. That’s the great thing about this github build. I have 2 versions installed in HA as addon

That’s the question. How did you install a second version and how do you select the desired version? As you can see from my original question, compiling a configuration using ESPHome 2024.4 results in a device (Sonoff Basic) that won’t connect to the network. The revert to 2024.3 fixed that but 2024.4 worked fine with all other ESP devices

How to install

Go to you Home Assistant’s Add-on Store and add this as repository. Check for updates (and if needed, refresh), and you should be able to install any of these versions.

Add this link:

Then you see " Legacy ESPHome versions repository" with 15 different esphome versions can install

1 Like

I know how to install one, but didn’t you say that you have two versions in Home Assistant?

I have 2 ESPhome versions as Addon in HA. When latest version give issues I use the other one to update the devices again back with a older esphome firmware

Esphome latest version and the 2023.11 version… You can also install a 3rd of 4rd version… Or all.if them

Thanks, this works like a charm.

1 Like