ESPHome 8266 memory size error

I have a Tuya device that I hacked a few years ago to use ESPhome in order to integrate it into Homeassistant. It has worked well and has been updated regularly. Two updates ago I got an error message when I tried to update.

“ERROR Error binary size: Error: ESP has been flashed with wrong flash size. Please choose the correct ‘board’ option (esp01_1m always works) and then flash over USB.”

I can’t find a board code that works and setting up USB connection again is a major headache. Is there a way out of this or do I just skip updates on these devices forever more?

Please post your device config correctly formatted for the forum.

There have been changes to the way the board is defined, this could be your issue if you are still using the old format that is no longer supported. See: [core] Remove old style platform configuration by jesserockz · Pull Request #8118 · esphome/esphome · GitHub

The error message was specific to memory size, so I tried a variety of definitions from the list referenced in the tool tip. I tried everything from 512k to 4 meg without success. I also tried a variety of board families.
The pertinent part of the definition looks like this:

esphome:
name: kmc-01
esp8266:
board: d1_mini

I should point out that the units are still functional. It is just that they cannot be updated.

Hopefully it it does not look like that and is actually indented correctly. In future please format your config correctly for the forum using the </> button (it may be under the cog menu on mobile), not the quote button.