Esphome device not available but online

Hello everyone,
I’m having some problems with some esp devices, specifically an esp32 and two esp8266.
I’ve had them since mounth but for the last 3/4 mounths they randomly start to appear unavailable while still online in the EspHome page. I can log in and see all the sensor status and everything seems fine but there is this problem with the interface with Home Assistant.
This problem is really annoying me because I can’t always relay these devices, but before, at least after a while, there was a notification in HA saying “New device detected” and after re-adding it, everything works as before.
Now with the new HA version, there is no notification to add the devices again and I don’t know how to get them working again.

For example I have this device “boiler” which does not appear in the esphome device list but it appears in the device list. In that way I’m not able to manage (remove) and try to re-add it.


The fun fact is that it also send some sensor status like temperature and energy.

I’ve tried to simply re-add the integration (boiler.local) but it says “device already configured”.
I’ve also tried removing it from config/.storage/core.device_registry. It didn’t appear for a while in either device window or espHome device, but it was still unavailable, and now we are back to normal as in the screenshots before.

I’ve tried all the tips in the old similar topics, but nothing works.

Any clue on how to solve this?
Really appreciate your time and help!

While waiting for the problem to be solved, I added another device called ‘boiler-bis’ to maintain the previous functionality. An encryption key now appears in the default code, which I did not have in the old codes.

api:
  encryption:
    key: "kQgHJBqEROVguK3cR1RNTQE0uwGEZCj7zE="

Could this be the problem?

I also got a notification to enter the encryption key to reconfigure some devices. I don’t have it in the code though, where can I find it?


So the problem happened to some other devices too but by following this guide for the majority of them it is solved.
Now I have just one device which is “not availble” and no matter how many times I delete the integration and re-add it to HA, it always shows some of its entities “not available”.