This is the second try for a PR that adds support for toggling the night light on SP3 devices. Compared to the other PR the power consumption code is removed and a fix to change a function from the private to protected space.
To not make a mess I had to refactor the BroadlinkSocketModel2Handler a bit. You should read over and see if it makes sense. I will gladly change some stuff if it looks a bit awkward with all the helper functions and long function names :)
Tested and verified to work on Ubuntu 16.04 running OpenHAB 2.2 in docker.
Please let me know if you would like me to supply the .JAR
This is the second try for a PR that adds support for toggling the night light on SP3 devices. Compared to the other PR the power consumption code is removed and a fix to change a function from the private to protected space.
To not make a mess I had to refactor the BroadlinkSocketModel2Handler a bit. You should read over and see if it makes sense. I will gladly change some stuff if it looks a bit awkward with all the helper functions and long function names :)
Tested and verified to work on Ubuntu 16.04 running OpenHAB 2.2 in docker.
Please let me know if you would like me to supply the .JAR