Function for setting light state.
Add a convenience function for getting brightness with percentage.