Add logging.
Set brightness as percentage.

- Fix update bug when state has not been read.