Adaptive Lightning Settings

Oh my. This sent me down a rabbit hole. I had no idea that mqtt allowed setting values while off. That’s pretty nice. I don’t want to switch over from ZHA, so I did some digging and found a lot has been uncovered since I last tried to change Hue light settings while they’re off.

I found some discussion on GitHub which also led to a great resource on the Zigbee message format for Hue lights. After a fix to zha_toolbox, I was able to get the following automation written (note that you’ll need the option to store the config in the attributes enabled for Adaptive Lighting).

I just finished it, so I’ll come back and update it if I find any problems. Thanks for the continued discussion here!

Edit 3/21 at 11:15am: Move code to a Gist (the link is to the version discussed in this post, but it’s since been enhanced to support brightness for non-smart loads).