I have had a problem with Home Assistant showing the same state for a sensor (a binary humidity sensor connected to gpio14) for several hours, which wasn’t the behaviour I expected
When I checked it was indeed showing the wrong state; when I manually toggled the switch a couple of times it started to report the correct state in HA
What probably happened is that the switch changed its state while HA was restarting and it missed the change as the sonoff only publishes the state of a sensor when this changes (but HA and mqtt were busy restarting)
Is there a way to avoid that?
I also have this issue and only found this post when I searched for a solution.
Anyone out there know how to get around this problem?
I was wondering how to restart the sonoff on (or just after) a HA restart…anyone know how to do that?
@francisp Cheers!
Will do some testing and report back how it goes!
EDIT: The automation triggers but does not restart the sonoff…So instead of hijacking this post I have detailed my steps to try to solve this problem here