Calculate min. power for set up the light state.
Merge branch 'master' of https://github.com/HPGurre/lms.git