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?
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.