reformat code

proof of concept for trigger by brightness level