Using a Xiaomi Round Button as a dimmer switch

I created an Appdaemon App so I can dimm my smart LEDs using a Xiaomi Round Button

I already use strategically placed Xiaomi Buttons to toggle some lights, especially in the bathroom, and the bedroom.

In these rooms there is no Alexa and I don’t always have my Smartphone at hand.

What I couldn’t do with these buttons until know was to adjust the brightness.

To do that I created an Appdaemon App which increases the brightness as long as I hold the button.

If it increases beyong 100% it starts again from 0%.

You can find the Appdaemon App in my repo under https://github.com/eifinger/appdaemon-scripts/tree/master/buttonClicked

2 Likes

This can also be fine without appdaemon, there is a thread on here somewhere :grinning:

I have all my automations in Appdaemon so this was my way to go. It would however be cool to see other ways.
Can you post a link here if you can find it?

Found them:

I do similar with NodeRed. I maintain the current brightness level in a flow variable, and then for each double click I increase the brightness by (approximately) 10 percent until max, then it starts over at low. I’ve also done the same to decrease the brightness by using triple clicks. Long holds are used to cycle through pre-defined rgb levels.
There are always multiple ways to skin these sorts of cats.