I have the following code in my config file:
sonoff:
username: !secret sonoff_username
password: !secret sonoff_pw
mode: local
reload: always
I have a dozen other identical switches working in HA for over a year. I purchased 20 of them at one time back a year ago and added one of those to my network just recently. It works in the eWeLink app but does not show up in HA even after a full reboot.