Dimmer using Zigbee-events while long-pressing a button

How do I handle dimmer-events when using IKEA’s five button remote?

I can handle events to turn on or off things using the remote by acting on the different events occurring when just short-pressing any of the buttons. Problem is that I cannot find a way to handle the dimming events.

When I long-press a button, I do receive the corresponding event for a long press. Then, no new event is sent until I release that same button. So far so good.

My problem is that the button I do push just fires the long-press event once when I do a long-press. In order to act upon the long-press event, I guess I’d have to use some kind of do..while statement to increase or decrease the brightness until the button is released. Unfortunately, it doesn’t seem to be such a thing as do...while in Jinja2.

So, what is the correct take on this in order to make the dimming feature work?

I have searched, but the examples I’ve found don’t work as expected.

Any idea, code examples or if there’s some kind of hidden setting, would be appreciated.

I don’t know if this helps, but you can create “do while” by using repeat while syntax-

OR repeat until-

Hi @ibennani,
I have the same challenge. Did you manage to get this working?

No, I did not. After a few tries I gave up.

Okay, same here :grin:
Thanks for your response.