ESPHome - Noise Encryption Issue (Tuya)

2 parts to this;

I have tried to update all my ESPHome devices to use the new Noise Encryption, but have run into an issue of running out of memory.

Without the encryption enabled, my file is using ~42% of the device’s flash capacity, however when I add the encryption;

    key: xxxxxxxxxxxxxxxxxxxxxxxxx

that jumps to ~51% capacity used. This is fine until I try to update the config and install. Because the OTA is more than the 49% free space remaining, I can’t install the new config as it doesn’t have “enough room for the new OTA”.

Most of my devices are Tuya based with the TYWE3S chip that I have converted to ESPHome.

Going buy the official data sheet, these have 2MB of Flash Memory.

Documentation on ESPHome indicates to label these as esp01-1m boards

platform: ESP8266
board: esp01_1m

However the ESP01_1m only has 1MB of Flash Memory. This appears to make ESPHome think there is only 1MB of free space to apply OTA when there is, in fact, 2MB. This would make the using encryption a viable option.

Should a different board be specified?

esp_wroom_02 and modwifi have 2MB flash. See A professional collaborative platform for embedded development · PlatformIO