Home Assistant SonoffLAN integration

Woke up this morning with Home Assistant saying I need to reconfigure my sonoff integration. I tried but it says appid is unauthorised and all my sonoff devices is unavailable.

Ive tried removing everything in my configuration.yaml and removing SonoffLAN and starting from scratch but get same error when adding the sonoff integration

Any Ideas?

1 Like

Issue is raised, need wait for the fix…

1 Like

Much appreciated

@CrowCoke I have the same. Woke up and Sonoff needs reconfiguring. How did you solve it?


1 Like

Watching for a fix on the git thread. Something about changing the app key in cloud.py??
Still broken here

Changed that line 107 in cloud.py worked after the second time

async def login(self, username: str, password: str, app=0) → bool:
async def login(self, username: str, password: str, app=1) → bool:

Possibly just a temporary hack/bandage I imagine

Yep it worked for me! I am not sure if I have to change it back to 0 again. (There was a 0 for a reason I take it…)

Mine has also stopped working today, after being fine for years :man_shrugging:

Where can I find this cloud.py file that needs editing please?

I see @Vetsus also has this issue.

Found it:


Interestingly, my Alexa has also stopped working with my sonoff / ewelink lights today too :man_shrugging:

New version just released

Release v3.5.2 - 2023-07-27 · AlexxIT/SonoffLAN (github.com)


Thanks for the heads up :smiley:

1 Like