lucien2k / sonoff-python

Make use of your sonoff smart switches without flashing them via the cloud APIs
MIT License
51 stars 32 forks source link

[Feature Request] Add a handler to trigger upon device change. #18

Open dsancheznet opened 4 years ago

dsancheznet commented 4 years ago

Hello, maybe it would be possible to add an event driven handler to be able to trigger changes in device states. Currently I'm working on a GUI based on sonoff-python and I have to trigger an update manually or timer-based.

Also it would be nice, if the instantiation wouldn't block the execution - although I can resolve that with threads or subprocesses...

Overall, this library s a nice job, guys!

Best Regards D.Sánchez