I have a bunch of sonoff devices. I’m using 2022.3.6 because the update after this breaks everything.
Just trying to keep status quo and it’s exceptionally difficult.
I have a virtualbox with home assistant. Works great when I roll back and launch. All my entities are there are working. My sonoffo integration is using Sonoff LAN (from HACS) and this configuration:
I was about to ask about the status of Option 19 on your devices, however this only applies to Sonoff devices running Tasmota, and the comment in your post suggests you are running Sonoff hardware with Sonoff stock firmware. Is that correct please?
For Tasmota firmware, Set Option 19 1 means a device appears in the MQTT integration, but with Set Option 19 0 a device appears via the dedicated Tasmota integration which includes additional state_class: config needed for energy.
Sadly, I’ve never run Sonoff firmware even once so can’t help - Tasmota is on all of my many ESP* devices.
That it happens on boot does suggest a discovery issue in the eWeLink binding - guess the code for state_class: initialisation might be new and a GitHub Issue might help debug it?
Flashing everything to Tasmota ESPhome doesn’t seem a good workaround - likely to get you a fresh set of issues to look at!
So, for some reason the snapshot I took had a function authentication token saved in memory- but when I reboot it tried to re-initialize with the saved username and password. And apparently ewelink forced a password reset on my account which I discovered trying to launch the app on my phone.
Fixing the password “fixes” some of the entities but in order to get my names back, I had to do one more restore back to the restore point that works, update passwords, and then reboot. Problem solved.
I don’t trust Sonoff devices at all. Their support is abysmal and the quality of products is poor.
I will never buy another rubbish Sonoff device again. It is cheap shite that will fail.