Filter Philips Hue Dimmer Switch Payloads

This Philips hue dimmer sends multiple payloads when a button is pressed.

For example:

Pressing the ON button (on_press) sends the following:

on_press

Holding the ON button (on_hold) sends the following:

on_hold

The problems comes in when I want to distinguish on_press from on_hold.

Holding the on button (on_hold) also always sends on_press message.

If I use a switch node, when I on_hold, it also sends on_press.

Is there some way of collecting all of the sent messages and only sending them based on some hierarchy. For example.

If array contains [on_hold, on_press, on_hold_release] only send on_hold and ignore the rest.

I would prefer to not have to use a function node if possible. Is there an existing node that can do this?

Use on_press_release instead of on_press.

Wow, that’s so simple and perfect…I can’t believe that never occurred to me.

Thank you so much.