API Encryption - where to update in Home Assistant?

It doesn’t even work for me when removing the ESPHome device and re-adding it with encryption enabled. Still getting the same error as described here not matter what I do.