Skip to content

Is there a smarter way to increase / decrease the brightness with a switch?

Is there a smarter way to increase / decrease the brightness with a switch?

Is there a smarter way to increase / decrease the brightness with a switch?

[Video of what I’ve done. ](Https://imgur.com/a/LBchnFp)

I added my Sonos speakers as lights to Homekit via Homebridge. I have a Hue adjustment switch that I would like to use to control the volume.

This solution works (provided I keep adding volume increases), but the instructions nested if I kill myself. Is there a better way to do this?