Dimming Philips Hue lights with Homematic IP HmIP-BRC2

Hello,

I want to use a Homematic IP HmIP-BRC2 wall button to dim Philips Hue lights. During pressing and holding the button up or down, it generates long press events periodically in quick succession.

Unfortunately the frequency of the long press events coming from the Homematic device is too high for the Hue lights, especially when using groups of lights. So I need to implement a rate limiter in the automation. From experiments I found out that two events per second with 10% brightness increase/decrease each are optimal, but now I don’t know how I can realize such rate limiting in the automation.

Can someone help me?

I found a solution on my own now, it’s quite simple. First I ensured that the automation has the mode ‘simple’ so that its execution is prevented if another instance is still running. Then I added a delay of 500 milliseconds after the actual action for increasing brightness of the lamps. So each automation execution lasts for 500 milliseconds and any trigger that fires before this duration is exceeded, is ignored.