ESPHome Please enter the updated key

ESPHome says my AG One air quality monitor “enabled transport encryption or changed the encryption key. Please enter the updated key. You can find it in the ESPHome Dashboard or in your device configuration.”

The configuration does not have an encryption key.

The configuration is:

#Enable Home Assistant API
api: # Add encryption key as desired

I did not add a key. But apparently, there is one somewhere.
Now the device is unavailable.

Other posts for similar problems seem to have “solved” the problem by replacing the board. I don’t see that as an option.

I expect the other 3 Air Gradient device will also be bricked by this.

How do I find the encryption key it’s looking for, and why can’t it run without one?

I have the same issue with one of my ESPhome device configs. I haven’t tried to fix it yet but can you do a serial re-flash to the device?

On the esphome dashboard have you tried 3 dots, Show API Key? Is the device still connecting to your network and/or can you ping it?

I think when I had an issue with encryption key I was able to connect to the device as an Access Point and then upload new firmware through the web page.

As per the OP, I also don’t have an API encryption key listed for my device that has this error. Not in the YAML and nothing via the kebab menu (as expected given that nothing is listed in YAML).

So as you said, need to reflash. Only thing is, and not knowing the device, may be hard to connect to.

OK, Here’s my solution:
I connected it directly to my Home Assistant Blue.
I re-flashed it.
I copied it’s configuration file for safe keeping.
Looking at the logs, device was working.
I copied the IP address from the log and added a “use_address:” to the saved config file.
I deleted the device in the ESPHome dashboard.
It immediately appeared as a discovered device.
I adopted the “new” device.
It gave me an encryption key.
I copied the new key and added it to the saved version of the saved config file.
Installing the “new” device failed looking for a password…( I don’t know what it was looking for here)
I edited the config file ESPHome generated when the device was adopted and replaced it with the saved config file.
I re-installed the device.
The logs show it is running.
Home assistant says it’s unavailable.
I commented out the “use_address:” line.
I re-installed the device.
The logs show it is running.
I ran the repair from the settings and entered the new encryption key.
The “repair” was accepted.
The device is still unavailable.
I restarted Home Assistant and the device is back on line.

And another device has the same problem…

Thanks for all of your assistance.