Closed beveradb closed 5 years ago
It works! Merging now, since the existing code is dreadful and this is infinitely better. I'd like future updates to go through some sort of code review if possible, but since nobody else is working on this yet I'm not sure how that would work.
As discussed in #7 - state is currently not handled at all, and in fact messages sent by the Sonoff device on the websocket connection are not ever even received as the connection isn't currently retained.
This PR is to implement a bare-minimum functional solution to solve this, so users can press the physical button(s) on their device and have the state update correctly in Home Assistant.